页面导航: 首页网络编程编程10000问 → 正文内容

如何让计数器只对新进用户计数?

发布:dxy 字体:[增加 减小] 类型:转载

如何让计数器只对新进用户计数?

<script language=vbscript runat=server>

sub application_onstart

filepath=server.mappath("/count")

filename=filepath+"\counter.txt"

set fs=createobject("scripting.filesystemobject")

if not fs.fileexists(filename) then

fs.createtextfile(filename)

set f=fs.getfile(filename)

s=1

Set ts = f.OpenAsTextStream(2, -2)

ts.writeline(cstr(s))

ts.close

else

set f=fs.getfile(filename)

Set ts = f.OpenAsTextStream(1, -2)

s=ts.readline+1

ts.close

end if

application(“visitor”)=s

end sub

sub session_onstart

session.timeout=5

application("visitor ")=application("visitor ")+1

set f=fs.getfile(filename)

Set ts = f.OpenAsTextStream(2, -2)

ts.writeline (cstr(application("visitor ")))

ts.close

end sub

</script>

<%

s=cstr(application("visitor")+10^6)

s=mid(s,2,6)

for i=1 to 6

response.write "<img src='flashdays/liyanbing/images/"

&mid(s,i,1)&".gif' width='18' height='25'>"

next

%>

[1]

浏览次数:载入中... 打印本文关闭本文文章来源
·在百度中搜索关于“如何让计数器只对新进用户计数?”相关内容
·在谷歌中搜索关于“如何让计数器只对新进用户计数?”相关内容

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行