PHP Hyper global variable $_server

Source: Internet
Author: User
Tags informix server port

$_server is an array of information, such as header information (header), path, and script location (scripts locations), and so on. The items in this array are created by the WEB server. There is no guarantee that each server will provide all the items, the server may ignore some, or provide some items that are not listed here.

  1. $_server[' Http_host ') requests the HOST content in the header information to obtain the current domain name.
  2. $_server["SERVER_NAME"] Output configuration file httpd.conf in servername, typically the same as the Http_host value, but if the server port is not the default port 80, or if the protocol specification is not http/1.1, Http_host contains this information, and server_name does not necessarily contain it. (mainly see settings for configuration files).
  3. $_server["Http_user_agent"] get user-related information, including user's browser, operating system and other information.
  4. $_server[' Http_accept ') the currently requested ACCEPT header information.
  5. $_server["Http_accept_language"] This value is sent by the browser, indicating the user's default language setting, followed by the Q value to indicate the user's preference for that language.
  6. $_server["Http_accept_encoding"] most modern browsers support gzip compression, and this information is reported to the server. The server then sends the compressed HTML to the browser. This can reduce the file size by nearly 80% to save download time and bandwidth.
  7. $_server["Http_cookie" browser COOKIE information.
  8. $_server["Http_connection"] the connection condition of the current request.
  9. $_server["http_upgrade_insecure_requests"] means that the browser can read the request sent by the server.
  10. $_server["Http_cache_control"] indicates whether the browser caches this page information.
  11. $_server["PATH"] the file system where the current script resides.
  12. $_server["SystemRoot"] the operating system of the current server.
  13. $_server["COMSPEC"] points to Cmd.exe path.
  14. $_server["Pathext"] environment variable settings.
  15. $_server["windir"] script points to the system directory.
  16. $_server["Server_signature"] contains a string of server version and virtual hostname.
  17. $_server["Server_software") Server Software configuration information.
  18. $_server["SERVER_ADDR"] the IP address of the server that is currently running the script.
  19. $_server["Server_port"] Server port.
  20. $_server["REMOTE_ADDR"] Browse the Web's user IP.
  21. $_server["Document_root"] the root directory where the script is currently running.
  22. $_server["Request_scheme"] server communication protocol, HTTP or HTTPS.
  23. $_server["Context_prefix"] prefix.
  24. $_server["Context_document_root"] the document root directory where the current script resides.
  25. $_server["Server_admin"] server administrator information.
  26. $_server["Script_filename"] the absolute path of the currently executing script.
  27. $_server ["Remote_port"] the port that the user is using when connecting to the server.
  28. $_server[the version of the CGI specification that the server uses for "Gateway_interface".
  29. $_server["Server_protocol"] the name and version of the communication protocol when the page is requested.
  30. $_server["Request_method"] the way to request data submission.
  31. $_server["query_string"] Server request? The following parameters.
  32. $_server["Request_uri"] the current script path, the directory after the root directory.
  33. $_server["Script_name"] the path of the current script. This is useful when the page needs to point to itself.
  34. $_server["Php_self"] The file name of the script that is currently executing.
  35. $_server["Request_time"] gets the timestamp at the start of the request.
Array ([http_host] = localhost [http_connection] = keep-alive [http_upgrade_insecure_requests] = 1 [Http_user_agent] = mozilla/5.0 (Windows NT 6.1; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/66.0.3359.139 safari/537.36 [http_accept] = Text/html,applicat ion/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 [http_accept_encoding] = gzip, deflate, BR [ Http_accept_language] = zh-cn,zh;q=0.9 [Http_cookie] = Phpsessid=bdj0ms7gg2qrhan2gfdjfjugk4 [PATH] = E:\ python27\; E:\Python27\Scripts; C:\Program files\ibm\gsk8\lib64; C:\Program Files\ibm\gsk8\bin; C:\Program Files\ibm\informix\11.70\bin; C:\ProgramData\Oracle\Java\javapath; G:\app\Administrator\product\11.2.0\dbhome_1\bin; C:\Program Files\java\jdk1.8.0_144\bin; C:\Program Files\java\jdk1.8.0_144\jre\bin; C:\Windows\system32; C:\Windows; C:\Windows\system32\wbem; E:\Git\cmd; G:\app\Administrator\product\11.2.0\dbhome_1\BIN; C:\Program Files (x86) \ibm\informix\client-SDK\Bin; G:\phpStudy\php\php-5.5.38; C:\composer; C:\Program Files (x86) \microsoft SQL server\100\tools\binn\; C:\Program Files\Microsoft SQL Server\100\tools\binn\; C:\Program Files\Microsoft SQL Server\100\dts\binn\; C:\Program Files (x86) \microsoft SQL Server\100\tools\binn\vsshell\common7\ide\; C:\Program Files (x86) \microsoft Visual Studio 9.0\common7\ide\privateassemblies\; C:\Program Files (x86) \microsoft SQL server\100\dts\binn\; C:\Yonghong\r\R-3.2.1\bin\x64; G:\phpStudy\php\php-5.5.38\ext; G:\phpStudy\php\php-5.5.38; G:\app\Administrator\product\11.2.0\dbhome_1\BIN;;D: \ Secure Shell client; G:\Redis; C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin; E:\vscode\Microsoft VS code\bin [SystemRoot] = C:\Windows [COMSPEC] = C:\Windows\system32\cmd.exe [Pathex T] = +. COM;. EXE;. BAT;. CMD;. VBS;. VBE;. JS;. JSE;. WSF;. WSH;. MSC [windir] = C:\Windows [Server_signature] = [Server_software] = apache/2.4.23 (Win32) openssl/1.0 .2j php/5.5.38 [server_name] =&GT localhost [server_addr] +:: 1 [server_port] = [REMOTE_ADDR] +:: 1 [document_root] = G:/phps tudy/www [Request_scheme] = http [Context_prefix] = [Context_document_root] + g:/phpstudy/www [SE     Rver_admin] = [email protected] [script_filename] = g:/phpstudy/www/test1.php [Remote_port] = 57468 [Gateway_interface] = cgi/1.1 [Server_protocol] = http/1.1 [Request_method] = = GET [Query_string] = [Request_uri] =/test1.php [Script_name] =/test1.php [Php_self] =/test1.php [request_time _float] = 1527907552.345 [Request_time] = 1527907552)

PHP Hyper global variable $_server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.