home *** CD-ROM | disk | FTP | other *** search
- <%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
-
- Response.Write "<b>" & counter & "</b> visits since 5 July 2000.<br>"
- td = FORMATDATETIME(DATE, vbShortDate)
- td = Replace(td, "/", "")
- td = td & ".txt"
- fpath = Server.Mappath(td)
-
- If FileObject.FileExists(fpath) Then
- set ActiveFile = FileObject.opentextfile(fpath)
- counter = clng(ActiveFile.readline)
- counter = counter + 1
- ActiveFile.close
- Set ActiveFile = FileObject.CreateTextFile(fpath, true)
- ActiveFile.WriteLine(counter)
- ActiveFile.Close
-
- Else
-
- Set ActiveFile = FileObject.CreateTextFile(fpath)
- ActiveFile.WriteLine("1")
- counter=1
- ActiveFile.Close
-
- End If
-
- Response.Write "<b>" & counter & "</b> visits today, " & Date & "<br>"
- %>
-
-