: This article describes common values in $ _ SERVER. For more information about PHP tutorials, see. $ _ Description of common values in SERVER
Use URL: http://www.pro.com/index.php? Type = 1 & id = 1
The oral information is unclear and the result is displayed directly.
[SCRIPT_NAME] =>/index. php // path containing the current script
[REQUEST_URI] =>/index. php? Type = 1 & id = 1 // after the domain name
[QUERY_STRING] => type = 1 & id = 1 //? The
[REQUEST_METHOD] => GET // request method
[REQUEST_SCHEME] => http // what protocol is used
[DOCUMENT_ROOT] => E:/DemoPro // root directory of the Accessed file
[REMOTE_ADDR] => 127.0.0.1 // Obtain the client IP address
[HTTP_X_FORWARDED_FOR] // the real IP address of the client obtained through the proxy server may not exist
[HTTP_CLIENT_IP] // Obtain the client and the IP address of the computer where the browser is located.
[SERVER_PORT] => 80 // server port
[SERVER_ADDR] => 127.0.0.1 // server IP address
[SERVER_NAME] => www.pro.com // host name
[HTTP_HOST] => www.pro.com // if it exists, it is the content of the Host: item in the current request header,
HTTP_HOST = SERVER_NAME: SERVER_PORT (ignored by default. If the ssl link is used, will the port number be displayed ?)
[REQUEST_TIME_FLOAT] => 1450940501.5163 // The time stamp at the request start, accurate in microseconds. Effective from PHP 5.4.0
[REQUEST_TIME] => 1450940501 // the timestamp at the request start. Available from PHP 5.1.0
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Official document http://php.net/manual/zh/reserved.variables.server.php
The preceding section describes the common values of $ _ SERVER, including related content, and hopes to help anyone who is interested in PHP tutorials.