<% dim visitors if session("counter")<>1 then session("counter")=1 whichfile=server.mappath("counter.txt") Set f = CreateObject("Scripting.FileSystemObject") Set thisfile = f.OpenTextFile(whichfile) Do While thisfile.AtEndOfLine <> True if thisfile.line=1 then linevalue=thisfile.readline thisvalue=Split(linevalue, " ") thedate=year(now) & "-" & month(now) & "-" & day(now) ' response.write thedate if cstr(thedate)<>thisvalue(0) then linevalue=cstr(thedate) & " 1" & chr(13) & chr(10) & cstr(linevalue) else linevalue=cstr(thedate) & " " & cstr(cint(thisvalue(1))+1) end if else linevalue=linevalue & chr(13) & chr(10) & thisfile.readline end if loop thisfile.close Set out=f.CreateTextFile(whichfile) out.WriteLine(linevalue) out.close set f=nothing end if %> 上海新树金属制品有限公司