huebi
09-21-2004, 01:46 AM
I have trouble writing from global.asa
my code looks like this
Sub Application_OnStart
Application("pathinfo")=Server.MapPath("test.txt")
End Sub
Sub Session_OnEnd
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile(Application("pathinfo"),2)
f.WriteLine("Text written by global.asa")
f.Close
set f=Nothing
set fs=Nothing
End Sub
I don't get any errors, but the the .txt file is not written to.
What am I doing wrong?
Thanks in advance
my code looks like this
Sub Application_OnStart
Application("pathinfo")=Server.MapPath("test.txt")
End Sub
Sub Session_OnEnd
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile(Application("pathinfo"),2)
f.WriteLine("Text written by global.asa")
f.Close
set f=Nothing
set fs=Nothing
End Sub
I don't get any errors, but the the .txt file is not written to.
What am I doing wrong?
Thanks in advance