In the previous author, I will introduce you to the use of two very practical ASP built-in object Application and Session. Since the onstart of the two must be declared in the global.asa file, this article will give you the usage method of the global.asa file. In order to make everyone profess the knowledge you have learned, this article will also give an ASP CHAT program for reference.
Recently, many friends come to believe, why there is such a fault in the first two model programs. First of all, I want to declare everyone, these procedures are written by I have, after the "factory", after passing the test, there is no "counterfeit and shoddy product." :) Since the program is used to record customer information in the program, if you don't set up the cookie in your browser, the program will not function properly. In addition, the program records the client information in the client's cookie is response.cookie, this statement must be written before the first tag in the ASP file, because cookies are header information as HTTP transmission Some sends to the customer, if the HTTP header information has been transferred to the customer, use the response.cookie, the following error will appear: "HTTP title has been written to the customer browser. Any HTTP title must be written before writing ", Some friends may not pay attention to the clipboard, disrupted the procedure before and after, or if the error will add HTML code before the ASP sample program, it causes the program to run an error. Therefore, I recommend that you do not change the program when you first run the routine, try to improve the program, on the basis of the program, on the other hand, at least in the browser when running the ASP program, you can accept the cookie Otherwise, once the Cookie or Session used in the ASP program, they will not function properly.
Let me introduce you to how the global.asa file.
What is a global.asa file? It is actually an optional file that can specify an event script in this file and declare an object with a session and application scope. The content of this file is not used to display the user, but is used to store event information and objects used by the application. The name of this file must be Global.asa and must be stored in the root of the application. Each application can only have a global.asa file.
In the global.asa file, if the included scripts are not available with the