Php pre-defined variables for php learning

Source: Internet
Author: User
This section describes the predefined php variables that are frequently used in php learning. you can use predefined variables to obtain information about user sessions, operating system environments, and local operating system environments.

This section describes the predefined php variables that are frequently used in php learning. you can use predefined variables to obtain information about user sessions, operating system environments, and local operating system environments.
$ _ SERVER ['server _ ADDR '] IP address of the SERVER on which the script is currently running.
$ _ SERVER ['server _ name'] NAME of the SERVER host where the script is currently running.
$ _ SERVER ['request _ method'] indicates the request method used to access the page.
$ _ SERVER ['remote _ ADDR '] is browsing the IP address of the user on the current page.
$ _ SERVER ['remote _ host'] is browsing the HOST name of the user on the current page.
$ _ SERVER ['remote _ port'] PORT used by the user to connect to the SERVER.
$ _ SERVER ['script _ filename'] indicates the absolute path of the SCRIPT to be executed.
$ _ SERVER ['server _ port'] PORT used by the SERVER.
$ _ SERVER ['server _ SIGNATURE '] a string containing the SERVER version and virtual host name.
$ _ SERVER ['document _ root'] ROOT directory of the DOCUMENT where the script is currently running.
$ _ COOKIE: The information sent to the script through HTTPCookie. These are set through setcookie () when executing a php script.
$ _ SESSION contains information related to all SESSION variables. $ _ SESSION variable is mainly used for SESSION control and cross-page value transfer.
$ _ POST parameter information passed through the post method.
$ _ GET parameters passed through the get method.
$ _ GLOBALS is an array composed of all defined global variables. The variable name is the index of the array. It can be called a super set of all super changes.

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.