asp利文本文档加FSO统计网站访问量的方法(2)
网络 2009/9/15 8:21:17 深山行者 字体:
大 中 小 浏览 10066
1.新建count.txt文件文档
<%
response.write "您是本页的第"&counter()&"位访客"
function counter()
whichfile=server.mappath("count.txt")
'打开文件并将其值读取,最后关闭连接释放资源
set fso=createobject("Scripting.FileSystemObject")
set openfile=fso.opentextfile(whichfile,1)
visitors=openfile.readline
openfile.close
'页面显示记数内容并做加1运算
visitors=visitors+1
'将新的数值添加写入到文本,最后关闭所有连接释放资源
set creatfile=fso.createtextfile(whichfile)
creatfile.writeLine(visitors)
creatfile.close
set fso=nothing
counter=visitors
end function
%>
- 相关阅读
- 几个经典的css技巧
- 定制开发微信小程序的操作流程
- 国旅(深圳)国际旅行社有限公司
- 酒店客房预订商建站解决方案
- optgroup 标签
- 利用java控制图片的大小
- ASP过滤SQL中的非法字符并格式化相关的html代码
- asp随机显示图象
- 共有0条关于《asp利文本文档加FSO统计网站访问量的方法(2)》的评论
- 发表评论