通过FSO进行页面计数
作者:cnbruce 来源:cnbruce博客 发布时间:2008-11-27 16:02:00
标签:fso,计数,统计
<%
Function FileCounter(counter_file)
Dim fs,txt,file
Application.lock
Set fs=Server.CreateObject("Scripting.FileSystemObject")
file=Server.MapPath(counter_file)
Set txt=fs.OpenTextFile(file,1,true)
if Not txt.atEndOfStream then
FileCounter=CLng(txt.ReadLine)
End if
FileCounter=FileCounter+1
txt.Close
On Error Resume Next
Set txt=fs.CreateTextFile(file,True)
if Err.Number=70 then
FileCounter="请先将"&file&"的只读属性去掉!"
ElseIf Err.Number<>0 then
FileCounter=Err.Description
else
txt.writeLine FileCounter
txt.close
End if
Application.Unlock
End function
%>
<%=FileCounter("num.txt")%>
0
投稿
猜你喜欢
- 本篇概要1.线程与多线程2.进程与多进程3.多线程并发下载图片4.多进程并发提高数字运算关于并发在计算机编程领域,并发编程是一个很常见的名词
- 在进行爬虫爬取淘宝商品信息时候,利用selenium来模拟浏览器进行爬取时遇到了这个问题:selenium.common.exception
- 更新 2016/8/9:最近发现目标网站已经屏蔽了这个
- 测试异常情况-- 1. 查询张三余额select * from account where name = '张三';-- 2
- 无图形界面的代码编写python代码作为脚本语言,其实最好直接使用vim在字符界面里面直接编写,这才是正道,但是作初学者,其实直接在服务器上
- mock.js简介官方链接:Mock.js (mockjs.com)前端开发人员用来模拟虚拟数据,拦截ajax请求,方便模拟后端接口安装np
- 本文实例讲述了微信小程序MUI导航栏透明渐变功能。分享给大家供大家参考,具体如下:导航栏透明渐变效果实现原理1. 利用position:ab
- 本文实例讲述了Python实现简单过滤文本段的方法。分享给大家供大家参考,具体如下:一、问题:如下文本:## Alignment 0: sc
- 一、Python2中的字符存在的解码编码问题如果是现在正在用Python2的人应该都知道存在字符编码问题,就举一个最简单的例子吧:Pytho
- 在Python中存储数据到文件中时,简单的做法是调用open函数执行文件写入操作,但是这样做的话,当我们要重新读取文件内容时,就会出现类型不
- 零、前言python代码中配置文件是必不可少的内容。常见的配置文件格式有很多中:ini、yaml、xml、properties、txt、py
- import sysfrom PyQt5 import QtWidgetsfrom PyQt5.QtWidgets import QMain
- 本文实例为大家分享了python mysql个人论文管理系统的具体代码,供大家参考,具体内容如下1.mysql数据库建表在mysql数据库里
- 本文实例总结了PHP常用字符串操作函数。分享给大家供大家参考,具体如下:/*常用的字符串输出函数** echo() 输出字符串* print
- 我们可以通过打开流并写入和读取 HTTP 请求和响应来使用 asyncio 查询网站的 HTTP 状态。然后我们可以使用 asyncio 并
- 一、为什么要使用Python进行数据分析?python拥有一个巨大的活跃的科学计算社区,拥有不断改良的库,能够轻松的集成C,C++,Fort
- 看了下网上有很多关于模拟登录淘宝,但是基本都是使用scrapy、pyppeteer、selenium等库来模拟登录,但是目前我们还没有讲到这
- 在 github 的 vue-router 中找到同样的一个问题:3.0.1版本通过router实例无法跳转昨天发现有些路由不能正常跳转,找
- 折腾了一天的时间,才弄出点眉目来。 做AJAX应用或Flash应用,提交中文内容到后台,涉及到编码解码(encode、decode)及编码格
- 1、简单示例如下: switch用例 var caseContent = '';//条件判断后处理内容 var caseVa