ASP ServerVariables 集合

asp servervariables 集合

request 對(duì)象參考手冊(cè) 完整的 request 對(duì)象參考手冊(cè)

servervariables 集合用于取回服務(wù)器變量的值。

語法

request.servervariables (server_variable)

參數(shù) 描述
server_variable 必需。要取回的 服務(wù)器變量 的名稱。

服務(wù)器變量

variable 描述
all_http returns all http headers sent by the client. always prefixed with http_ and capitalized
all_raw returns all headers in raw form
appl_md_path returns the meta base path for the application for the isapi dll
appl_physical_path returns the physical path corresponding to the meta base path
auth_password returns the value entered in the client's authentication dialog
auth_type the authentication method that the server uses to validate users
auth_user returns the raw authenticated user name
cert_cookie returns the unique id for client certificate as a string
cert_flags bit0 is set to 1 if the client certificate is present and bit1 is set to 1 if the ccertification authority of the client certificate is not valid
cert_issuer returns the issuer field of the client certificate
cert_keysize returns the number of bits in secure sockets layer connection key size
cert_secretkeysize returns the number of bits in server certificate private key
cert_serialnumber returns the serial number field of the client certificate
cert_server_issuer returns the issuer field of the server certificate
cert_server_subject returns the subject field of the server certificate
cert_subject returns the subject field of the client certificate
content_length returns the length of the content as sent by the client
content_type returns the data type of the content
gateway_interface returns the revision of the cgi specification used by the server
http_<headername> returns the value stored in the header headername
http_accept returns the value of the accept header
http_accept_language returns a string describing the language to use for displaying content
http_cookie returns the cookie string included with the request
http_referer returns a string containing the url of the page that referred the request to the current page using an tag. if the page is redirected, http_referer is empty
http_user_agent returns a string describing the browser that sent the request
https returns on if the request came in through secure channel or off if the request came in through a non-secure channel
https_keysize returns the number of bits in secure sockets layer connection key size
https_secretkeysize returns the number of bits in server certificate private key
https_server_issuer returns the issuer field of the server certificate
https_server_subject returns the subject field of the server certificate
instance_id the id for the iis instance in text format
instance_meta_path the meta base path for the instance of iis that responds to the request
local_addr returns the server address on which the request came in
logon_user returns the windows account that the user is logged into
path_info returns extra path information as given by the client
path_translated a translated version of path_info that takes the path and performs any necessary virtual-to-physical mapping
query_string returns the query information stored in the string following the question mark (?) in the http request
remote_addr returns the ip address of the remote host making the request
remote_host returns the name of the host making the request
remote_user returns an unmapped user-name string sent in by the user
request_method returns the method used to make the request
script_name returns a virtual path to the script being executed
server_name returns the server's host name, dns alias, or ip address as it would appear in self-referencing urls
server_port returns the port number to which the request was sent
server_port_secure returns a string that contains 0 or 1. if the request is being handled on the secure port, it will be 1. otherwise, it will be 0
server_protocol returns the name and revision of the request information protocol
server_software returns the name and version of the server software that answers the request and runs the gateway
url returns the base portion of the url

實(shí)例

您可以像這樣來循環(huán)遍歷所有的服務(wù)器變量:

<%
for each x in request.servervariables
  response.write(x & "
")
next
%>

下面的實(shí)例演示了如何查明訪問者瀏覽器的類型、ip 地址等等:




you are browsing this site with:
<%response.write(request.servervariables("http_user_agent"))%>



your ip address is:
<%response.write(request.servervariables("remote_addr"))%>



the dns lookup of the ip address is:
<%response.write(request.servervariables("remote_host"))%>



the method used to call the page:
<%response.write(request.servervariables("request_method"))%>



the server's domain name:
<%response.write(request.servervariables("server_name"))%>



the server's port:
<%response.write(request.servervariables("server_port"))%>



the server's software:
<%response.write(request.servervariables("server_software"))%>




request 對(duì)象參考手冊(cè) 完整的 request 對(duì)象參考手冊(cè)
相關(guān)文章
亚洲国产精品第一区二区,久久免费视频77,99V久久综合狠狠综合久久,国产免费久久九九免费视频