플밍_ASP

FileSystemObject 이용, 로그남기기(ASP)

잠수콩 2008. 11. 12. 10:45


<%
set fso = Server.Createobject("Scripting.filesystemobject")
result = fso.fileexists("D:\Site_Test\test.txt")

if result = true then
 Set ofile=fso.OpenTextFile("D:\Site_Test\test.txt",8,true)

 ofile.Writeline "datetime=" & now()
 ofile.Writeline "------------"

 ofile.close
  Set ofile=Nothing
end if

Set fso=Nothing
%>