PHP $_server Detailed

Source: Internet
Author: User
Tags http authentication php programming

PHP programming often need to use some of the server's information, I put the commonly used in highlighting the way out, the rest is put in the back. Easy access later

$_server['Http_accept_language']//Browser Language$_server['REMOTE_ADDR']//The current user IP. $_server['Remote_host']//Current User host name$_server['Request_uri']//URL$_server['Remote_port']//Port. $_server['server_name']//the name of the server host. $_server['php_self']//the file name of the script being executed$_server['argv']//The arguments passed to the script. $_server['argc']//the number of command-line arguments passed to the program. $_server['Gateway_interface']//the version of the CGI specification. $_server['Server_software']//server-identified strings$_server['Server_protocol']//the name and version of the communication protocol when the page is requested$_server['Request_method']//request method when accessing a page$_server['query_string']//a string that queries (query). $_server['Document_root']//the document root directory where the current run script resides$_server['http_accept']//Accept for current request: The contents of the header. $_server['Http_accept_charset']//Accept-charset of the current request: the contents of the header. $_server['http_accept_encoding']//accept-encoding of the current request: the contents of the header$_server['http_connection']//Connection of the current request: the contents of the header. For example: "Keep-alive". $_server['Http_host']//Host of the current request: the contents of the header. $_server['Http_referer']//the URL address of the previous page that links to the current page. $_server['http_user_agent']//User_agent of the current request: the contents of the header. $_server['HTTPS']//if accessed over HTTPS, it is set to a non-null value (on), otherwise it returns off$_server['Script_filename'] #当前执行脚本的绝对路径名. $_server['Server_admin'] #管理员信息 $_server['Server_port'] #服务器所使用的端口 $_server['server_signature'] #包含服务器版本和虚拟主机名的字符串. $_server['path_translated'] #当前脚本所在文件系统 The base path (not the document root). $_server['Script_name'] #包含当前脚本的路径. This is useful when the page needs to point to itself. $_server['Php_auth_user'] #当 PHP runs in the Apache module mode and is using the HTTP authentication feature, which is the user name entered by the user. $_server['PHP_AUTH_PW'] #当 PHP runs in the Apache module mode and is using the HTTP authentication feature, which is the password that the user entered. $_server['Auth_type'] #当 PHP runs in the Apache module mode and is using the HTTP authentication feature, which is the type of authentication



PHP $_server Detailed

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.