% Sub Jsq() dim fs,txt,counter_file '创建服务对象 Set fs=Server.CreateObject("Scripting.FileSystemObject") '设置数据文件路径和名称(该文件必须存在) counter_file=Server.MapPath("jcount.dat") '打开文件 Set txt=fs.OpenTextFile(counter_file) '读取一行数据 Application("n")=txt.Readline txt.Close '递增数据并写入新值 if request.Cookies("alang")<>"yes" then Application("n")=Application("n")+1 set txt=fs.CreateTextFile(counter_file) txt.Writeline(Application("n")) txt.Close end if End Sub Application.Lock '暂时锁定 Call Jsq() Application.UnLock '解锁 Response.Cookies("alang")="yes" '限制为每30分钟内刷新不计数 Response.Cookies("alang").Expires=FormatDateTime(DateAdd("n",5,Now)) %>
|
|
| |||||||||
|
本网站由江西广渡禅寺主持建设,如有关于本网站的问题或建议,请向网站管理员
ffcy@sohu.com 发邮件。
|