环 境 变 量

<%
response.write Request.ServerVariables("SERVER_NAME")
response.write "<br>"
response.write request.servervariables("appl_physical_path")
response.write "<br>"
response.write request.servervariables("script_name")
response.write "<br>"
response.write request.servervariables("path_info")
response.write "<br>"
response.write request.servervariables("HTTP_REFERER")
response.write "<br>"
For Each Item In Request.ServerVariables()
response.write item & ":" & Request.ServerVariables(Item) & "<br>"
Next
%>

 

下为结果:

www.XXXXX.com
D:XXXXXXXXXXXXXXXXXXX
/test/xx/victor/servervariables.asp
/test/xx/victor/servervariables.asp

ALL_HTTP:HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:zh-cn HTTP_COOKIE:ASPSESSIONIDCCCADQQA=COGJDMKAFKALHPGDCKNBPOHO HTTP_HOST:www.XXX.com HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
ALL_RAW:Connection: Keep-Alive Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* Accept-Encoding: gzip, deflate Accept-Language: zh-cn Cookie: ASPSESSIONIDCCCADQQA=COGJDMKAFKALHPGDCKNBPOHO Host: www.XXX.com User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
APPL_MD_PATH:/LM/W3SVC/922079197/Root/test
APPL_PHYSICAL_PATH:D:xxxxxxxx
AUTH_PASSWORD:
AUTH_TYPE:
AUTH_USER:
CERT_COOKIE:
CERT_FLAGS:
CERT_ISSUER:
CERT_KEYSIZE:
CERT_SECRETKEYSIZE:
CERT_SERIALNUMBER:
CERT_SERVER_ISSUER:
CERT_SERVER_SUBJECT:
CERT_SUBJECT:
CONTENT_LENGTH:0
CONTENT_TYPE:
GATEWAY_INTERFACE:CGI/1.1
HTTPS:off
HTTPS_KEYSIZE:
HTTPS_SECRETKEYSIZE:
HTTPS_SERVER_ISSUER:
HTTPS_SERVER_SUBJECT:
INSTANCE_ID:922079197
INSTANCE_META_PATH:/LM/W3SVC/922079197
LOCAL_ADDR:XX.XX.XX.XX
LOGON_USER:
PATH_INFO:/xx/xx/victor/servervariables.asp
PATH_TRANSLATED:D:wwwrootxxxxxxxxvictorservervariables.asp
QUERY_STRING:
REMOTE_ADDR:xx.xx.xx.xx
REMOTE_HOST:xx.xx.xx.xx
REMOTE_USER:
REQUEST_METHOD:GET
SCRIPT_NAME:/xx/xx/victor/servervariables.asp
SERVER_NAME:www.XX.com
SERVER_PORT:80
SERVER_PORT_SECURE:0
SERVER_PROTOCOL:HTTP/1.1
SERVER_SOFTWARE:Microsoft-IIS/6.0
URL:/xx/xx/victor/servervariables.asp
HTTP_CONNECTION:Keep-Alive
HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:zh-cn
HTTP_COOKIE:ASPSESSIONIDCCCADQQA=COGJDMKAFKALHPGDCKNBPOHO
HTTP_HOST:www.XX.com
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

    A+
发布日期:2007年03月15日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: