$_SERVER current information

Connection: https://www.cnblogs.com/mafeng/p/5868117.html

$_SERVER['HTTP_ACCEPT_LANGUAGE']//Browser language 
$_SERVER['REMOTE_ADDR'] //Current user IP. 
$_SERVER['REMOTE_HOST'] //Current user hostname 
$_SERVER['REQUEST_URI'] //URL

$_SERVER['REMOTE_PORT'] //Port. 
$_SERVER['SERVER_NAME'] //The name of the server host. 
$_SERVER['PHP_SELF']//The filename of the script being executed 
$_SERVER['argv'] //Arguments passed to the script. 
$_SERVER['argc'] //Number of command line arguments passed to the program. 
$_SERVER['GATEWAY_INTERFACE']//Version of the CGI specification. 
$_SERVER['SERVER_SOFTWARE'] //Server ID string 
$_SERVER['SERVER_PROTOCOL'] //The name and version of the communication protocol when requesting a page 
$_SERVER['REQUEST_METHOD']//The request method when accessing a page 
$_SERVER[ 'QUERY_STRING'] //The query string. 
$_SERVER['DOCUMENT_ROOT' 

$_SERVER['HTTP_ACCEPT_CHARSET'] //The content of the Accept-Charset: header of the current request. 
$_SERVER['HTTP_ACCEPT_ENCODING'] //The content of the Accept-Encoding: header of the current request 
$_SERVER['HTTP_CONNECTION'] //The content of the Connection: header of the current request. For example: "Keep-Alive". 
$_SERVER['HTTP_HOST'] //The content of the Host: header of the current request. 
$_SERVER['HTTP_REFERER'] //The URL address of the previous page linked to the current page. 
$_SERVER['HTTP_USER_AGENT'] //Content of the User_Agent: header of the current request. 
$_SERVER['HTTPS']//If accessed through https, it is set to a non-empty value (on), otherwise it returns off 
$_SERVER['SCRIPT_FILENAME'] #The absolute path name of the currently executing script. 
$_SERVER['SERVER_ADMIN'] #Administrator information 
$_SERVER['SERVER_PORT'] #The port used by the server 
$_SERVER['SERVER_SIGNATURE'] #A string containing the server version and virtual host name. 
$_SERVER['PATH_TRANSLATED' ] #The base path of the file system (not the document root) where the current script is located.
$_SERVER['SCRIPT_NAME'] # Contains the path to the current script. This is useful when the page needs to point to itself. 
$_SERVER['PHP_AUTH_USER'] #When PHP runs in Apache module mode and is using HTTP authentication, this variable is the username entered by the user. 
$_SERVER['PHP_AUTH_PW'] #When PHP runs in Apache module mode and is using HTTP authentication, this variable is the password entered by the user. 
$_SERVER['AUTH_TYPE'] #When PHP runs in Apache module mode and is using HTTP authentication function, this variable is the type of authentication

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324701974&siteId=291194637