Home>Article>Backend Development> Introduction to PHP predefined variables
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!