利用Global.ASP定时执行ASP
Using the global.asa to schedule ASP code execution.
Have you ever had some asp code that needed to execute every once in a while but, you just didn't know how to do it.
There is a solution that doesn't involve running any scheduling or scripting software on the server and is actually very easy to get working.
You see... there is thing called the "global.asa". Most ASP newbies probably wonder what the heck it even is. The Global.asa file is event driven. It can contain four event procedures: Application_OnStart, Application_OnEnd, Session_OnStart, and Session_OnEnd.
The global.asa is basically loaded into memory the first time any user views a page on your Web application. There are event procedure stubs that can contain script you want to be executed when the application starts or ends, or when the session starts or ends.
With some tricky coding you can use this file to schedule code to execute. At least around the time you need it to, this won't be able to make it execute at exactly a certain time.
Here is the 1st example. It simply keeps track of how many visitors
相关文档:
asp连接access和mssql的万能代码:
'解决了ACCESS数据库路径的问题!
'采用DBType=0或DBType=1来区分AC库还是MSSQL库
'具体采用AC库时应注意的事项,请看程序说明
-----------------------------------------------
Dim DBType,Conn,StrConn
DBType=0 '0为Access数据库,1为MSSQL数据库
If(DBType=0) Then
......
一、conn.asp
<%
'@Language="VBSCRIPT" CODEPAGE=65001
'meta http-equiv="Content-Type" content="text/html; charset=gb2312"
' 936 utf-8
class TDB
function qry(byval sqlquery)
& ......
HTML:
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<META HTTP-EQUIV="expires" CONTENT="0">
PHP:
header("Expires: Mon, 26 Jul 1997 ......
一、 环境设置
服务器端的环境设置从参考数据上看,微软系列的设置应该都行,即:
1.Win9x+PWS+Office
2.Win2000 Professional+PWS+Office
3.Win2000 Server+IIS+Office
目前笔者测试成功的环境是后二者。Office的版本没有特别需求,考虑到客户机设置的不确定性和下兼容特性,建议服务器端Of ......
由于现在在公司负责制作标准的静态页面,为了增强客户体验,所以经常要做些AJAX效果,也学你也和我一样在,学习AJAX。而设计AJAX时使用的一个重要的技术(工具)就是XMLHTTPRequest对象了。这里海啸把我学习XMLHTTPRequest对象的一点资料拿出来跟大家一起分享。文中的资料都是海啸在学习时在网上收集的,如果您开过,那就再 ......