IP address of this file: <% = "http: //" & request. servervariables ("SERVER_NAME") & request. servervariables ("_ name") %>
Local IP address: <% = request. servervariables ("remote_addr") %>
Server Name: <% = request. servervariables ("SERVER_NAME") %>
Server IP: <% = request. servervariables ("local_addr") %>
Server port: <% = request. servervariables ("server_port") %>
Server time: <% = now %>
IIS Version: <% = request. servervariables ("server_software") %>
Script Timeout: <% = server. Timeout %>
Path of this file: <% = server. mappath (request. servervariables ("_ name") %>
Server CPU usage: <% = request. servervariables ("number_of_processors") %>
Server interpretation engine: <% = engine & "/" & enginemajorversion & "." & engineminorversion & "." & enginebuildversion %>
Server Operating System: <% = request. servervariables ("OS") %>
Supported file types: <% = request. servervariables ("http_accept") %>
Path of the accessed file: <% = request. servervariables ("http_url") %>
User Agent Information: <% = request. servervariables ("http_user_agent") %>
Get the file name in the URL and the passed value: request. servervariables ("_ name") + "? "+ Request. servervariables (" QUERY_STRING ")
Bytes -----------------------------------------------------------------------------------------------------
The result is as follows:
IP address of this file: http: // localhost/Ceshi. asp
Local IP Address: 127.0.0.1
Server Name: localhost
Server IP Address: 127.0.0.1
Server port 8091
Server time: 2005-7-27 14:28:04
Microsoft-IIS/5.0
Script Timeout: 90
Path: e:/hospital/Ceshi. asp
Server CPU count: 2
Server interpretation engine: Vb/5.6.7426
Server Operating System: windows_nt
Supported file types: image/GIF, image/X-xbitmap, image/JPEG, image/pjpeg, application/vnd. MS-PowerPoint, application/vnd. MS-Excel, application/MSWord, application/X-Shockwave-flash ,*/*
Path of the accessed file:/Ceshi. asp
User Agent Information: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; COM + 1.0.2204)
If you get the directory of this file, you can use the following functions:
<%
Public serverpath
Dim path
Dim POS
Path = "http: //" & request. servervariables ("SERVER_NAME") & request. servervariables ("_ name ")
Pos = Limit Rev (path ,"/")
Serverpath = left (path, POS)
End
%>
==================================
File directory: <% = serverpath %>
==================================