惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy International News Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
Cloudbric
Cloudbric
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tenable Blog
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
V
Visual Studio Blog
P
Proofpoint News Feed
Webroot Blog
Webroot Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Jina AI
Jina AI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东

博客园 - 登峰

VS2010 工具箱装载出错 将用户导入到membership 网络和笔记本 用live writer写博客 上海招聘.net程序员 Virtual Machine--Vmware(2) Virtual Machine -- VmWare(1) 代码自动生成操作 - 登峰 - 博客园 病毒惹的祸 一道受用终身的测试题 慎用优化工具 一个简单的存储过程代码生成器 DataGrid的Bug? 哪个是最好的ORM C#设计模式---概述篇 还原master数据库 Sql Server实用操作小技巧集合(转载) .net 程序发生了一个不可捕获的异常 n取的r的组合数问题
javascript写计数器 - 登峰 - 博客园
登峰 · 2007-05-09 · via 博客园 - 登峰

<script   language   =   "vbscript"   runat   =   "server">   
  sub   application_onstart   
          '取的计数文件的真实路径   
          countfile=server.mappath("count.txt")   
          '创建文件系统对象实例   
          set   myfso   =   server.createobject("scripting.filesystemobject")   
          '若计数文件不存在   
  if   not   myfso.fileexists(countfile)   then   
                  '创建该文件及取得textstream对象实例   
  set   mytextstream   =   myfso.createtextfile(countfile,   True)   
  application.lock   
  application("online")   =   0   
  application("counter")   =   0   
  application.unlock   
  '将计数值写入文件     
  mytextstream.writeline(cstr(application("counter")))   
  else   
                  '以只读的方式打开   
                  set   mytextstream   =   myfso.opentextfile(countfile,1,false)   
                  '读一行,并将值赋给计数变量   
                  application("counter")   =   mytextstream.readline   
  end   if   
        mytextstream.close   
        set   myfso   =   nothing   
  end   sub   
  sub   session_onstart   
          session.timeout   =   1   
          countfile   =   server.mappath("count.txt")   
          set   myfso   =   server.createobject("scripting.filesystemobject")   
          application.lock   
          application("online")   =   application("online")+1   
          application("counter")   =   application("counter")+1   
          application.unlock   
          '以写方式打开文件   
          set   mytextstream   =   myfso.opentextfile(countfile,2,false)   
          '以写行的方式将数据写入文件   
          mytextstream.writeline(cstr(application("counter")))   
          mytextstream.close   
          set   myfso   =   nothing   
  end   sub   
  sub   session_onend   
          application.lock   
          application("online")   =   application("online")-1   
          application.unlock   
  end   sub   
  </script>                                 
  <html>   
  <head>   
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">   
  <title>计数器例子</title>   
  </head>   
  <body>   
  <div   align="center">您是本站第<font   color="#FF0000"><%=application("counter")%></font>位贵宾!     
  </div>   
  </body>   
  </html>