Search Tools Links Login

Asp log 1.0 (if necessary)

Posted: 2002-06-01
By: ArchiveBot
Viewed: 53

Filed Under:

ASP/ HTML

No attachments for this post


with this code can be written log file from asp page

Original Author: Dimo Mitchev

Inputs

string to be writen

Assumptions

can be adobted for many files, some formating...
'(may be in next versions)

API Declarations

free

Code

sub writelog(lstr1)
dim fs,fname
set fs=Server.CreateObject("Scripting.FileSystemObject")
If not (fs.FileExists("logasp.txt"))=true Then
set fname=fs.CreateTextFile("logasp.txt",true)
fname.WriteLine(lstr1)
fname.Close
else
dim f
set f=fs.OpenTextFile("logasp.txt",8,true)
f.WriteLine(lstr1)
f.Close
set f=Nothing
end if
set fname=nothing
set fs=nothing
end sub


Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.