harleydude
September 20th, 2006, 07:30 AM
I have the following code in a .lhtml file. The LogFile variable is actually assigned a file name passed in thru webserver:GetCGI(). I have it hard coded for testing this issue.
<table width="70%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="securitylog">
<%
local LogFile = "WebAccess "..os.date("%Y-%m-%d")..".Log"
local ConfigFile = win.GetDirectory('GIRDERDIR').."\\UserData\\WebAccess\\"
webserver:print (ConfigFile..LogFile)
%>
</td>
</tr>
</table>
When I access the page the actual lua code is displayed on the screen instead of just printing the ConfigFile..LogFile. I believe the problem is the last \\ on the win.GetDirectory line. If I remove the \\ then the page displays however the file path/name is not usable for retreiving the contents of the file. Bug or am I doing something wrong? Same problem on versions 4.0.5.1 & 4.0.5.2.
<table width="70%" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="securitylog">
<%
local LogFile = "WebAccess "..os.date("%Y-%m-%d")..".Log"
local ConfigFile = win.GetDirectory('GIRDERDIR').."\\UserData\\WebAccess\\"
webserver:print (ConfigFile..LogFile)
%>
</td>
</tr>
</table>
When I access the page the actual lua code is displayed on the screen instead of just printing the ConfigFile..LogFile. I believe the problem is the last \\ on the win.GetDirectory line. If I remove the \\ then the page displays however the file path/name is not usable for retreiving the contents of the file. Bug or am I doing something wrong? Same problem on versions 4.0.5.1 & 4.0.5.2.