<%
sub application_onstart
set fs=server.createobject("scripting.filesystemobject")
counter_file=server.mappath("count/counter.txt")
set txt=fs.opentextfile(counter_file)
application("counter")=txt.readline
txt.close
set application("fs")=fs
application("counter_file")=counter_file
end sub
%>
<%
incementcounter()
sub incementcounter()
set fs=server.createobject("scripting.filesystemobject")
counter_file=server.mappath("count/counter.txt")
set txt=fs.opentextfile(counter_file)
application("counter")=txt.readline
txt.close
application("counter")=application("counter")+1
session("connected")=true
set txt=fs.createtextfile(counter_file,true)
txt.writeline(application("counter"))
txt.close
end sub
%>
<% =gcounter(application("counter")) %>
<%
function gcounter(counter)
dim s,i,g
s=cstr(counter)
for i=1 to len(s)
g=g&" |
51366.cn |
| |
||||||||||