Home > Backend Development > PHP Tutorial > Description of commonly used values ​​in $_SERVER

Description of commonly used values ​​in $_SERVER

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:09:21
Original
993 people have browsed it

Description of commonly used values ​​in $_SERVER
Use URL: http://www.pro.com/index.php?type=1&id=1
The dictation is not clear, just go to the results
[SCRIPT_NAME] => /index.php //Contains the path of the current script
[REQUEST_URI] => /index.php?type=1&id=1 //After the domain name
[QUERY_STRING] => type=1&id=1 // ?
[REQUEST_METHOD] => GET // Request method
[REQUEST_SCHEME] => http // What protocol to use
[DOCUMENT_ROOT] => E:/DemoPro // Accessed file root directory
[REMOTE_ADDR] => 127.0.0.1 // Obtain the client's IP address
[HTTP_X_FORWARDED_FOR] //It may not be possible to obtain the client's real IP address through the proxy server
[HTTP_CLIENT_IP] //It may be possible to obtain the ip address of the client and the computer where the browser is located None
[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 an SSL link is used, the port number will be Displayed? )

[REQUEST_TIME_FLOAT] => 1450940501.5163 //The timestamp when the request starts, microsecond level accuracy. Valid since PHP 5.4.0
[REQUEST_TIME] => 1450940501 //The timestamp when the request started. Available from PHP 5.1.0 onwards
[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 documentation http://php. net/manual/zh/reserved.variables.server.php

The above introduces the commonly used value descriptions in $_SERVER, including relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
server
From 1970-01-01 08:00:00
0
0
0
Configure server
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template