亲宝软件园·资讯

展开

怎样让计数器只对新进用户计数?

人气:0
想了解怎样让计数器只对新进用户计数?的相关内容吗,在本文为您仔细讲解的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:怎样何让让计计数数器器只只对对新新进进用用户户计计数数??,下面大家一起来学习吧。

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

<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

 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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]

加载全部内容

相关教程
猜你喜欢
用户评论