一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

asp 用户访问统计代码{fso}

时间:2008-07-31 编辑:简简单单 来源:一聚教程网



 
 
   
You are the
    <%whichfile=server.mappath("counter/count.txt")
      Set fs=CreateObject("Scripting.FileSystemObject")
      Set thisfile=fs.opentextfile(whichfile)
      visitors=thisfile.readline
      thisfile.close
     
        ip=Request.ServerVariables("REMOTE_ADDR")
     '比对新老IP
     if not ip=session("OldIp") then
     session("OldIp")=ip
     visitors=visitors+1
     else
     visitors=visitors
     end if
      countlen=len(visitors)
      for i=1 to countlen
      response.write ""
      next
      set out=fs.createtextfile(whichfile)
      out.writeline(visitors)
      out.close
      set fs=nothing
    %>Visitor