Đối tượng máy chủ ASP
Đối tượng Server được sử dụng để truy cập các thuộc tính và phương thức trên máy chủ.
Thêm ví dụ
Lần cuối cùng một tập tin được sửa đổi là khi nào?
Kiểm tra thời điểm tập tin được sửa đổi lần cuối.
Mở một tập tin văn bản để đọc
Mở "Textfile.txt" để đọc.
Đối tượng máy chủ
Đối tượng ASP Server được sử dụng để truy cập các thuộc tính và phương thức trên máy chủ. Các thuộc tính và phương thức của nó được mô tả dưới đây:
Của cải
Property | Description |
---|---|
ScriptTimeout | Sets or returns the maximum number of seconds a script can run before it is terminated |
phương pháp
Method | Description |
---|---|
CreateObject | Creates an instance of an object |
Execute | Executes an ASP file from inside another ASP file |
GetLastError() | Returns an ASPError object that describes the error condition that occurred |
HTMLEncode | Applies HTML encoding to a specified string |
MapPath | Maps a specified path to a physical path |
Transfer | Sends (transfers) all the information created in one ASP file to a second ASP file |
URLEncode | Applies URL encoding rules to a specified string |