PHP $_server Detailed

Source: Internet
Author: User
Tags http authentication

PHP gets basic information about the server:

$_server[' http_accept_language ']//browser language
$_server[' REMOTE_ADDR '//Current user IP.
$_server[' remote_host '///Current User host name
$_server[' Request_uri ']//url

$_server[' remote_port '//port.
$_server[' server_name '//name of the server host.
$_server[' php_self ']//the file name of the script being executed
$_server[' argv '///parameters passed to the script.
$_server[' argc '///The number of command-line arguments passed to the program.
Version of $_server[' Gateway_interface ']//cgi specification.
$_server[' server_software '//server-identified string
$_server[' Server_protocol '//The name and version of the communication protocol when requesting a page


$_server[' Request_method ']== ' POST ';//Request method when accessing a page
A string of $_server[' query_string '//Queries (query).
$_server[' document_root '///the document root directory where the script is currently running
$_server[' http_accept '///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: contents of the head
$_server[' http_connection '///CONNECTION of the current request: the contents of the header. For example: "Keep-alive".
$_server[' http_host '///Current requested HOST: The contents of the header.
$_server[' http_referer '//link to the URL address of the previous page of the current page.
$_server[' http_user_agent '///user_agent of the current request: the contents of the header.
$_server[' https ']//if accessed via HTTPS, 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 ' #当前脚本所在文件系统 basic 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.