ASP-Server-objekt
- Föregående sida ASP-session
- Nästa sida ASP-fel
The function of the ASP Server object is to access properties and methods related to 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 properties and methods related to the server. The properties and methods are described as follows:
Property
Property | Describe |
---|---|
ScriptTimeout | Set or return the maximum time (in seconds) that it can run before a script terminates. |
Method
Method | Describe |
---|---|
CreateObject | Create an instance (instance) of an object. |
Execute | Execute an ASP file from another ASP file. |
GetLastError() | Return the ASPError object that describes the error state that has occurred. |
HTMLEncode | Tillämpa HTML-kodning på en specifik sträng. |
MapPath | Mappa en angiven adress till en fysisk adress. |
Transfer | Överför alla informationer som skapas i en ASP-fil till en annan ASP-fil. |
URLEncode | Tillämpa URL-kodningsregler på den angivna strängen. |
- Föregående sida ASP-session
- Nästa sida ASP-fel