/*-------------------------------------------------------------------------------------/
*-->Author: Paramecium
*-->Time: 2007-4.28---2007-4.30 (It turned out to be a manual written by myself, and I am now posting it here)
*-->Contact:[email protected]
*-->Document functions:
1. Review ASP, deepened my understanding of ASP structure and ASP experience
2. It can be used as ASP reference. It is written by yourself, making it more convenient to refer to it.
This is the second part: the seven major objects of ASP
/*-----------------------------------------------------------------------------------------------------------------------------
*-->Application object:
Function: Share information among all users of a given application and persistent saves during server operation
Moreover, the Application object also has methods to control access to application layer data and can be used in the application startup
Events that trigger the process when moving and stopping (OnStart event and OnEnd event)
Attribute: No built-in attributes
Collection: that is, user-defined properties
Collection and description of Application objects:
Contents: All variables stored in the Application object that are not defined using the <OBJECT> element (and
A collection of their values. Includes references to Variant arrays and Variant type object instances
StaticObjects: All variables stored in Application object defined using <OBJECT> element
A collection of (and their values)
Corresponding examples:
Set the application property value:
Application("MyVar")="Hello"
SetApplication("MyObj")=Server.CreateObject("MyComponent")
method:
Contents.Remove(): Remove an application collection
Contents.Removeall(): Remove all Application collections
Lock(): prevents other customers from modifying variables stored in Application objects to ensure that only
There is a customer that can modify and access Application variables. If the user does not explicitly call Unlock
Method, the server will unlock the Application object after the .asp file ends or timeouts.
Certainly
Unlock(): enables other clients to modify the storage after locking the Application object using the Lock method.
Variables in this object. If the method is not explicitly called, the web server will end or time out at the .asp file
Unlock the Application object later
An example of a comprehensive point:
In 1.asp:
'Set 3 application attribute values
application("chong1")="1st application collection item"
application("chong2")="2nd application collection item"