One, Application object
It is equivalent to an application set, similar to a global variable, so it can be shared, primarily to implement page usage information in your application, such as database connection information. Method is a collection, key, and key-value pairs.
such as the Lock method:
<%
application.lock
application ("visits") =application ("visits") +1
application.unlock
%> This
page has been visited
<%=application ("visits")%> times!
You can prevent more than one user from accessing the visits at the same time and unlocking it with unlock.
Second, Session object
Used to store or change information about a user's session, he is the interaction between each user and the server, so he is local.
For example, traversing the content collection
<% for each
x in application.contents
Response.Write (x & "=" & Application.Contents (x) & "<br& gt; ")
Next
%>
or:
<% for
i=1 to Application.Contents.Count
Response.Write (i & "=" & Application.Contents (i) & "<br>")
Next
%>
Three, the server object.
Used to get the call between the server information and the local.
For example, you cannot create an object with the same name as a built object
<%
Set application=server.createobject ("Application")
%>
In summary, the entire application has only one application object, and everyone can access the Server,session object. Their methods, as well as their usefulness, require us to continue to explore. Come on.