广 告
| 信息技术应用 >>  asp文本记数器
热 

asp文本记数器
作者:转载    转贴自:ASP300.com    点击数:5284    文章录入: zhaizl

<%
'******************************************************************************************************
'asp文本记数器
'Powered by myhon
'Date:2006-05-15
'counter.asp:统计点击次数
'counter.cnt:实际是一个文本文件,保存点击的次数
'使用方法:在需要进行记数的页面中加入:
'注意counter.asp,couner.cnt两个文件引用的路径要正确
'******************************************************************************************************

dim path,myFile,read,write,cntNum
path=server.mappath("counter.cnt")
read=1
write=2
Set myFso = Server.CreateObject("Scripting.FileSystemObject")
set myFile = myFso.opentextfile(path,read)
cntNum=myFile.ReadLine
myFile.close
cntNum=cntNum+1
set myFile = myFso.opentextfile(path,write,TRUE)
myFile.write(cntNum)
myFile.close
set myFile=nothing
set myFso=nothing
%>
document.write('<%=cntNum%>');

  • 上一篇文章: chopsticks, 中国筷子文化

  • 下一篇文章: 给ueditor编辑器赋值
  •   最新5篇热点文章
      最新5篇推荐文章
      相关文章
    ·给ueditor编辑器赋值[675]
    ·著名心血管外科专家叶世铎教授…[778]
    ·美最新研究:一见钟情可能存在并…[778]
    ·干细胞移植治疗小细胞肺癌无效[778]
    ·《皇家学会学报B》:新西兰发现…[778]
    ·C# Request.ServerVariables2[1072]
    ·Request.ServerVariables[1076]
    ·html基本标签大全[1091]
    ·浅析C# List实现原理[1108]
    ·龙芯3a7000最新进展[1111]
    ·asp网站中使用百度ueditor教程[1102]
    ·aspx 中轻松实现文件上传[1278]
    ·ASP.NET动态修改Title[1544]
    ·ASP.NET IIS使用错误 无法显示 XML 页[2361]
    ·Windows 2003下不注册组件用ASP发邮件[2536]
     
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)