%set FileObject = createobject("scripting.filesystemobject") totfile = server.mappath("counter.txt") If FileObject.FileExists(totfile) Then set ActiveFile = FileObject.opentextfile(totfile) counter = clng(ActiveFile.readline) counter = counter + 1 ActiveFile.close Set ActiveFile = FileObject.CreateTextFile(totfile, true) ActiveFile.WriteLine(counter) ActiveFile.Close Else Set ActiveFile = FileObject.CreateTextFile(totfile) ActiveFile.WriteLine("1") counter=1 ActiveFile.Close End If %>
![]() |
![]() |