How to use php predefined variables

王林
Release: 2023-02-26 10:02:01
Original
2731 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!