Home > Backend Development > PHP Tutorial > php super global variable

php super global variable

巴扎黑
Release: 2016-11-29 09:52:19
Original
1266 people have browsed it

PHP Super Global Array, also known as PHP predefined array, is built into the PHP engine and does not need to be redefined by developers. When a PHP script runs, PHP automatically places some data in a super global array.

 php super global variable list
 $_GET[] Get the variable array submitted by the GET method
 $_POST[] Get the variable array submitted by the POST method
 $_COOKIE[] Get and set the cookie identifier of the current website
 $_SESSION[ ] Obtain the unique identification of the current user access, in the form of an array, such as sessionid and custom session data
  $_ENV[] Current php environment variable array
  $_SERVER[] Current php server variable array
  $_FILES[] Submitted when uploading files Parameter values ​​to the current script, reflected in the form of an array
  $_REQUEST[] contains all requests submitted by the current script, all actions of $_GET, $_POST, $_COOKIE, $_SESSION
  $GLOBALS[] contains all super globals of the executing script Variable reference content
PHP system constant
__FILE__ The absolute path and file name of the current PHP program script
__LINE__ The line number where the constant is stored
__FUNCTION__ The function name where the constant is stored
__CLASS__ The name of the class where the constant is stored
PHP_VERSION Stores the current PHP version number, which can also be obtained through the PHPVERSION() function.
 PHP_OS stores the operating system of the current server

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template