来源:自学PHP网 时间:2015-02-03 17:41 作者: 阅读:次
[导读] 如何让计数器只对新进用户计数?...
NEWSZW_HZH_BEGIN-->
如何让计数器只对新进用户计数?<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] NEWSZW_HZH_END--> |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com