Home  >  Article  >  Backend Development  >  Explain the predefined super global array variables of PHP arrays

Explain the predefined super global array variables of PHP arrays

jacklove
jackloveOriginal
2018-06-08 11:02:041083browse

php Arrays play an important role in php. This article will explain its related contents in detail.

1)GLOBALS

2) _SERVER

Server variables, different web servers may have different contents

3) G ET gets HTTPGET Parameters passed by the HTTP POST method, such as parameters passed by the url or form GET method

4) _POST

Get parameters passed by the HTTP POST method, such as parameters passed by the form POST method

5) F ILESHTTP file upload variable

6) _COOKIE

7) S ESSION

8) _REQUEST

includes G ET, _POST and C OOKIE All content in .

9) _ENV

Environment variables are related to the environment in which PHP is running.

If there is no data, it may be related to the phpini configuration item variables_order configuration item

already A defined (existing) variable (the type of data stored is an array).

Super global: super global variable, scope (valid area)!

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

1.get method

For example:

Parameter name=parameter value¶meter Name = parameter value...

On the server side (the requested php file), you can obtain the _GET index value as the parameter name through GET, and the data corresponding to the index value is the parameter value

2.Post method

For example, it is sent via form post!

Can be obtained through $_POST!






预定义超全局数据变量

姓名:
性别:

This article explains the predefined super-global array variables of PHP arrays. For more related content, please pay attention to the PHP Chinese website.

Related recommendations:

Explain how to use pdo placeholder in php

##List PHP null value detection functions and methods

PHP connects to the database and implements the most basic add, delete, modify and query operations through process-oriented methods

The above is the detailed content of Explain the predefined super global array variables of PHP arrays. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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