%
Const ForReading = 1, ForWriting = 2, ForAppending =3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
filepath=server.mappath("/count")
filename=filepath+"\counter.txt"
set fs=createobject("scripting.filesystemobject")
if fs.fileexists(filename) then
set f=fs.getfile(filename)
Set ts = f.OpenAsTextStream(ForReading,
TristateUseDefault)
s=ts.readline+1
ts.close
else
fs.createtextfile(filename)
set f=fs.getfile(filename)
s=1
end if
'向counter.txt中写数据
Set ts = f.OpenAsTextStream(ForWriting,
TristateUseDefault)
ts.writeline(cstr(s))
ts.close
'显示计数器
s=cstr(s+1000000)
s=mid(s,2,6)
for i=1 to 6
response.write "
"
next
%>
|
北京中嘉华诚网络安全技术有限公司版权所有 |
Copyright Beijing ZhongJiaHuaCheng Networks Security Technology Co.,Ltd All Rights Reserved 公司地址:北京海淀区阜成路14号B座7层 电话:(010)68370181 传真:(010)68370181-333 TCP备案序号:京ICP备05032384号 |