%
function count()
application.lock
dim vistors
countfile=server.mappath("counter.dat")
set fs=server.createobject("scripting.filesystemobject")
set thisfile=fs.opentextfile(countfile,1,FALSE,FALSE)
visitors=thisfile.readline
thisfile.close
set fs=server.createobject("scripting.filesystemobject")
set thisfile=fs.createtextfile(countfile,TRUE,FALSE)
if IsEmpty(session("connected")) then
application.lock
visitors=visitors+1
thisfile.writeline(visitors)
application.unlock
else
application.lock
visitors=visitors
thisfile.writeline(visitors)
application.unlock
end if
session("connected")=TRUE
countlen=len(visitors)
for i=1 to countlen
response.write ""
next
thisfile.close
set fs=nothing
end function
%>
![]() |
|
![]() |
![]() |
![]() |
![]() |
|
||||
|
|
||
|
|
|||
|
|
|
Copy Right © 2003 ylcy.com All
Rights Reserved
|