PHP Predefined variables

Source: Internet
Author: User
Tags root directory

For you to introduce PHP learning in the regular use of the PHP predefined variables, through predefined variables can get user sessions, user operating system environment and the environment of the local operating system and other information.

$_server[' SERVER_ADDR '] The IP address of the server on which the script is currently running.

$_server[' server_name ' The name of the server host on which the script is currently running.

$_server[' Request_method '] The request method when accessing the page.

$_server[' REMOTE_ADDR ' is browsing the IP address of the current page user.

$_server[' Remote_host ' is browsing the host name of the user for the current page.

$_server[' Remote_port ' the port used by the user to connect to the server.

$_server[' Script_filename '] the absolute path of the current script execution.

$_server[the port used by the ' Server_port ' server.

$_server[' Server_signature ' contains a string of server versions and virtual host names.

$_server[' Document_root '] the document root directory where the script is currently running.

$_cookie information passed to the script via HttpCookie. These are set by Setcookie () when executing PHP scripts.

$_session contains information about all session variables. $_session variables are mainly used for session control and the transfer of values between pages.

$_post parameter information passed through the POST method.

$_get The parameter information passed through the Get method.

$_globals an array of all defined global variables. The variable name is the index of the array. It can be called a super set of all super variables.

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.