上一篇 | 下一篇

ASP计数器

发布: 2008-6-27 11:50 | 作者: admin | 来源: | 查看: 0次

************************调用*********************

'*

'*************************************************

Javastr="

"

<%

max=Request("max") '//计数器位数

If Request.cookies("count")="" Then '//防刷

Set fso=Server.CreateObject("Scripting.FileSystemObject")

Set fp=fso.OpenTextFile(Server.MapPath("count.dat")) '//计数器统计文件

countn=fp.Readline

countn=countn+1

Fp.close

Set fp=Nothing

set fp=fso.createtextfile(server.mappath("count.dat"))

fp.Writeline countn

set fp=nothing

set fso=nothing

Response.Cookies("count")=countn

End If

Set fso=Server.CreateObject("Scripting.FileSystemObject")

Set fp=fso.OpenTextFile(Server.MapPath("count.dat"))

s=fp.Readline

For n=(max-len(s)) to 1 step -1

%>

javastr=javastr+"" '//计数器图片文件

<%

Next

j=0

For i=(max-len(s)) to max-1

j=j+1

%>

javastr=javastr+""

<%

Next

Set fp=Nothing

Set fso=Nothing

javastr=javastr+"

"

%>

document.write(javastr)

字号: | 推荐给好友

评分:0

我来说两句