Home>Article>Backend Development> Introduction to PHP predefined variables

Introduction to PHP predefined variables

小云云
小云云 Original
2018-03-27 13:10:34 1549browse

What are the predefined variables in php? This article mainly shares with you an introduction to PHP predefined variables, hoping to help you.

1. Predefined variables are not user-defined variables, but variables defined by PHP. Users can use them directly. There are 9 commonly used predefined variables

1. $_GET( ): Receive data transmitted by GET method

2. $_POST(): Receive data transmitted by POST method

3. $_REQUEST(): Receive data transmitted by any method

4. $_SERVER: Server and client related information

5. $GLOBALS: Global data

6. $_COOKIE: Cookie stores data to the user’s computer

7. $_SESSION: session stores user data on the server and can be used across files

8. $_FILES: file upload

9. $_ENV: environment variable

The above 9 predefined variables all encapsulate different data.

Related recommendations:

Detailed explanation of PHP predefined variables

Detailed explanation of PHP predefined variable examplesphp predefined variable

The above is the detailed content of Introduction to PHP predefined variables. 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