ASP Server Object
- Previous Page ASP Session
- Next Page ASP Error
The function of the ASP Server object is to access the properties and methods of the server.
Instance
- When was this file last modified?
- Detect the last update time of the file.
- Open and read a text file
- In this example, the file "Textfile.txt" is opened for reading.
- Self-made click counter
- In this example, a number is read from a file, 1 is added to this number, and then this number is written back to this file.
Server object
The function of the ASP Server object is to access the properties and methods of the server. The properties and methods are described as follows:
Property
Property | Description |
---|---|
ScriptTimeout | Set or return the maximum time (in seconds) that it can run before a script terminates. |
Method
Method | Description |
---|---|
CreateObject | Create an instance of an object (instance). |
Execute | Execute an ASP file from another ASP file. |
GetLastError() | Returns an ASPError object that describes the error state that has occurred. |
HTMLEncode | Apply HTML encoding to a specified string. |
MapPath | Map a specified address to a physical address. |
Transfer | Transfer all information created in one ASP file to another ASP file. |
URLEncode | Apply URL encoding rules to the specified string. |
- Previous Page ASP Session
- Next Page ASP Error