当前位置: 首页 > 图文教程 > 网络编程 > ASP > javascript asp教程第十课--global asa

ASP
javascript asp教程More About Recordsets
javascript asp教程添加和修改
javascript asp教程 日期相关
简单的ASP分页代码(测试正确)
用ASP打开远端MDB文件的方法
asp下同一空间多绑多哥域名的方法
asp下实现替换远程文件为本地文件并保存远程文件的代码
asp,VBscript语法错误,史上最全最详细最精确
讲解ASP方面的知识比较全的asp学习教程
给万博系统的新闻系统增加分页功能[配有详细说明]
在asp中通过vbs类实现rsa加密与解密的代码
一段在asp中加密与解密对应的函数
通过MSXML2自动获取QQ个人头像及在线情况(给初学者)
用ASP VBS xmlhttp adodbstream下载和保存图片的代码
厉害的用Asp获取Dll加密新闻内容
用正则和xmlHttp实现的asp小偷程序
ASP之简化创建关闭记录集对象并创建使用简单的MSSQL存储过程
ASP中怎么实现SQL数据库备份、恢复!
asp中实现随机分组程序的代码
asp之字符串操作函数

ASP 中的 javascript asp教程第十课--global asa


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 52 ::
收藏到网摘: n/a

Global.asa:

First of all, what is a global.asa? It's an optional script file that holds certain "global" information that you can access through the entire ASP appliciation. The global.asa is a plain text file saved with the .asa extension.

You should only have one global.asa and it should go in your top level directory.

Below is an example global.asa file. Don't try to understand the script just yet. We'll get to the specifics in the next two lessons.

<OBJECT RUNAT=Server SCOPE=Session ID=MyInfo PROGID="MSWC.MyInfo">
</OBJECT>
<SCRIPT RUNAT="Server" LANGUAGE="JavaScript">
function Application_OnStart()	{	Application("someVariableName")="some value"	}
function Application_OnEnd()	{	Application.Contents.RemoveAll()	}
function Session_OnStart()	{	Session.Timeout=15	}
function Session_OnEnd()	{	//Do Nothing	}
</SCRIPT>
<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\Common Files\System\ado\msado15.dll"
-->

List of Can Do's:

There are four things you can do with a global.asa.

1) Object Declarations
2) Application Events
3) Session Events
4) Library Reference.

I don't expect you understand any of that yet. Just remember, there are only a few things we can do with the global.asa. Let's move on to lesson 11.