Pre-defined Hyper-global array variables that explain PHP arrays

Source: Internet
Author: User
PHP Arrays play an important role in PHP, which will be explained in detail in this article.

1) GLOBALS

2) _server

Server variables, different Web servers may have different content

3) G et gets the parameters passed by HttpGet mode such as URL or form get pass

4) _post

Gets the parameters passed by the HTTP POST method, such as the form POST method.

5) F ileshttp File upload variable

6) _cookie

7) S Ession

8) _request

Contains all the contents of G ET, _post and C Ookie.

9) _env

environment variables, related to the environment in which PHP is running

If no data may be associated with the Phpini configuration item variables_order Configuration item

A variable that has already been defined (exists) (the type of data being stored is an array).

Hyper Global: Super global variable, scope (active area)!

There are two main ways to pass data (submit data) to the server side

1.get mode

Like what:

Parameter name = argument value & parameter name = parameter value ...

On the server side (the requested PHP file side) can get to the _get index value to the parameter name, the index value corresponding to the data is the parameter value

2.post mode

Like the form Post sent over!

Can be obtained through the $_post!

<?phpvar_dump ($_get);? ><! DOCTYPE html>

This article explains the predefined hyper-global array variables for PHP arrays, and more about the PHP Chinese web.

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.