M
MichaelK
I need to write a log file on server side.
I'm using the code below. By some reason it just hanging on and not doing
anything.
Just the progress bar is moving very very slow and maximum gets to the
middle.
Tryed it on two different server, same result.
I have feeling I used to run this before with Server.MapPath and without,
and it worked.
But not now.
Can somebody tell what's wrong with it?
Thanks,
Michael
Here is the code:
<%
sub WriteToFile(FileName, Contents, Append)
on error resume next
Dim oFs, oTextFile, iMode
if Append = true then
iMode = 8
else
iMode = 2
end if
set oFs = server.createobject("Scripting.FileSystemObject")
set oTextFile = oFs.OpenTextFile(FileName, iMode, True)
oTextFile.Write Contents
oTextFile.Close
set oTextFile = nothing
set oFS = nothing
end sub
WriteToFile "zzz.txt", "XXXXXXXXXXXXXXXXX", true
response.write "Recorded"
%>
I'm using the code below. By some reason it just hanging on and not doing
anything.
Just the progress bar is moving very very slow and maximum gets to the
middle.
Tryed it on two different server, same result.
I have feeling I used to run this before with Server.MapPath and without,
and it worked.
But not now.
Can somebody tell what's wrong with it?
Thanks,
Michael
Here is the code:
<%
sub WriteToFile(FileName, Contents, Append)
on error resume next
Dim oFs, oTextFile, iMode
if Append = true then
iMode = 8
else
iMode = 2
end if
set oFs = server.createobject("Scripting.FileSystemObject")
set oTextFile = oFs.OpenTextFile(FileName, iMode, True)
oTextFile.Write Contents
oTextFile.Close
set oTextFile = nothing
set oFS = nothing
end sub
WriteToFile "zzz.txt", "XXXXXXXXXXXXXXXXX", true
response.write "Recorded"
%>