Home > Backend Development > PHP Tutorial > Predefined variables PHP

Predefined variables PHP

巴扎黑
Release: 2016-11-23 15:26:29
Original
1002 people have browsed it

$_SERVER: http://www.php.net/manual/zh/reserved.variables.server.php

$_ENV: http://www.php.net/manual/zh/reserved.variables.environment. The data in php

$_POST and $_GET can be obtained through $_REQUEST, but $_REQUEST will be slower than $_GET and $_POST.

$_FILE: File upload, http://www.php.net/manual/zh/features.file-upload.post-method.php only has data when uploading files via POST. Refer to Example #3 on the help page

$_COOKIE and $_SESSION are used for session control.

In addition, if you want to customize the value in $_SERVER, you only need to add some commonly used variables (mostly used in clusters) in fastcgi_params. Add the following codes:

fastcgi_param DB4_USER root;
fastcgi_param DB4_PASS "";
fastcgi_param DB4_HOST localhost;
fastcgi_param DB4_PORT 3306;
fastcgi_param DB4_NAME test;


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