Home > Article > Backend Development > Predefined variables PHP
$_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;