Home  >  Article  >  Backend Development  >  How to use php predefined variables

How to use php predefined variables

王林
王林Original
2019-10-11 11:52:332799browse

How to use php predefined variables

1. $GLOBALS

Description: globals is a built-in feature of PHP that can automatically obtain the contents of all variables in the current page, including local variables. , global variables, static variables

2, $_SERVER

Description: The server will automatically obtain server and client information

$_SERVER is a containing An array of information such as header, path, and script locations.

3. $_FILES

Description: Get information about uploaded files

4.$_GET: Transmit data in url mode

Explanation: In fact, it is the browser address transmission method

Transmission method: URL address?Parameter value 1=value 1&Parameter value 2=value 2….

Transmission form: The get method and hyperlink method of the form

5, $_POST: http post method to transmit data

Description: Transmit data through the post method of http protocol

Transmission method: form post method or ajax

6, $_REQUEST: http request variable

Description: $_GET and $_POST are included by default and array of $_COOKIED

Recommended tutorial: PHP video tutorial

The above is the detailed content of How to use 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
Previous article:Is php language good?Next article:Is php language good?