时间:2021-05-28
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.
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
本文利用asp和JMAIL实现了发送邮件,大家是不是很好奇这到底是怎么实现的呐,和小编一起一探究竟吧!Global.asa文件什么是Global.asa文件?它
下面我来向大家介绍Global.asa文件的使用方法。 什么是Global.asa文件?它其实是一个可选文件,程序编写者可以在该文件中指定事件脚本,并声明具有
导读:本文介绍了在ASP中使用Global.asa文件中的Session和Application两个对象记录在线用户数量的方法。网络的访问量是每一个做网站的网友
不用Global.asa也能实现统计在线人数吗?timeoutthencount=count-1endifrspredel.movenextlooprspred
'设置好global.asa文件,如下:SubApplication_OnStartApplication("ActiveUsers")=0'设置计数初始值,可