Php server variable $ _ SERVER introduction. SERVER variable $ _ SERVER Summary: $ _ SESSION [PHP_SELF] -- get the file name of the currently executing script. $ _ SERVER [SERVER_PROTOCOL] -- Name of the communication protocol and SERVER variable on the request page $ _ SERVER summary:
- $ _ SESSION ['php _ SELF '] -- get the file name of the script being executed.
- $ _ SERVER ['server _ protocol'] -- name and version of the communication PROTOCOL used to request the page. For example, "HTTP/1.0 ".
- $ _ SERVER ['request _ time'] -- the timestamp at the REQUEST start. Valid from PHP 5.1.0. The same effect as the time function.
- $ _ SERVER ['argv'] -- parameters passed to the script. I tried the get method to get $ _ SERVER ['argv'] [0]. The post method cannot assign a value to him.
- $ _ SERVER ['server _ name'] -- returns the current host NAME.
- $ _ SERVER ['server _ soft'] -- the string of the SERVER identifier, which is provided in the header information in the response request. For example, Microsoft-IIS/6.0
- $ _ SERVER ['request _ method'] -- the request method used to access the page. For example, "GET", "HEAD", "POST", and "PUT ".
- $ _ SERVER ['query _ string'] -- QUERY (query) STRING (the first question mark in the URL? ).
- $ _ SERVER ['document _ root'] -- ROOT directory of the DOCUMENT where the script is currently running. Defined in the server configuration file. E: \ server
- $ _ SERVER ['http _ ACCEPT '] -- Accept of the current request: content of the header information.
- $ _ SERVER ['http _ ACCEPT_CHARSET '] -- Accept-Charset of the current request: content of the header information. Example: "ISO-8859-1, *, UTF-8 ".
- $ _ SERVER ['http _ ACCEPT_ENCODING '] -- Accept-Encoding of the current request: content of the header information. For example, "gzip ".
- $ _ SERVER ['http _ ACCEPT_LANGUAGE '] -- the Accept-Language of the current request: the content of the header information. For example, "en ".
- $ _ SERVER ['http _ connection'] -- CONNECTION of the current request: content of the header information. For example, "Keep-Alive ".
- $ _ SERVER ['http _ host'] -- HOST of the current request: header information.
- $ _ SERVER ['http _ referer'] -- link to the URL of the previous page of the current page.
- $ _ SERVER ['http _ USER_AGENT '] -- returns the browser information used by the user. You can also use get_browser () to obtain this information.
- $ _ SERVER ['https'] -- if HTTPS is used for access, it is set to a non-null value; otherwise, off is returned.
- $ _ SERVER ['remote _ ADDR '] -- browsing the IP address of the user on the current page.
- $ _ SERVER ['remote _ host'] -- the HOST name of the user browsing the current page. Reverse domain name resolution is based on the user's REMOTE_ADDR. For example, 127.0.0.1 is returned for a local test.
- $ _ SERVER ['remote _ port'] -- the PORT used by the user to connect to the SERVER. I did not pass the test on the local machine. I don't know why.
- $ _ SERVER ['script _ filename'] -- the absolute path name of the currently executed SCRIPT. E: \ server \ index. php is returned.
- $ _ SERVER ['server _ admin'] -- this value specifies the SERVER_ADMIN parameter in the Apache SERVER configuration file. If the script runs on a VM, this value is the value of that VM.
- $ _ SERVER ['server _ port'] -- the PORT used by the SERVER. The default value is "80 ". If SSL secure connection is used, this value is the HTTP port set by the user.
- $ _ SERVER ['server _ SIGNATURE '] -- a string containing the SERVER version and virtual host name.
- $ _ SERVER ['path _ TRANSLATED '] -- the basic PATH of the file system where the current script is located (not the root directory of the document. This is the result of a virtual image to a real path on the server. Apache 2 users can use AcceptPathInfo On in httpd. conf to define PATH_INFO.
- $ _ SERVER ['script _ name'] -- contains the path of the current SCRIPT. This is useful when the page needs to point to itself. _ FILE _ contains the absolute path and FILE name of the current FILE (for example, including the FILE ).
- $ _ SERVER ['request _ URI '] -- URI required to access this page. For example, "/index.html ".
- $ _ SERVER ['php _ AUTH_DIGEST '] -- during HTTP Digest Authentication when running as an Apache module, this variable is set to the "Authorization" HTTP header content sent by the client (for further authentication ).
- $ _ SERVER ['php _ AUTH_USER '] -- When PHP runs in the Apache or IIS (PHP 5 is an ISAPI) module and is using the HTTP authentication function, this variable is the user name entered by the user.
- $ _ SERVER ['php _ AUTH_PW '] -- When PHP runs in the Apache or IIS (PHP 5 is an ISAPI) module and is using the HTTP authentication function, this variable is the password entered by the user.
- $ _ SERVER ['auth _ type'] -- When PHP runs in the Apache module mode and is using the HTTP authentication function, this variable is the authentication TYPE.
Summary $ _ SERVER: $ _ SESSION ['php _ SELF '] -- get the file name of the currently executing script. $ _ SERVER ['server _ protocol'] -- communication PROTOCOL name and...