Predefine variable PHP note :? $ _ SERVER: www. php. netmanualzhreserved. variables. server. php $ _ ENV: www. php. netmanualzhreserved. variables. environment. php? $ _ POST, $ _ GET's predefined variable PHP
Note:
?
$ _ SERVER: http://www.php.net/manual/zh/reserved.variables.server.php
$ _ ENV: http://www.php.net/manual/zh/reserved.variables.environment.php
?
$ _ POST and $ _ GET can all be obtained through $ _ REQUEST, but $ _ REQUEST is slower than $ _ GET and $ _ POST.
$ _ FILE: FILE upload, the http://www.php.net/manual/zh/features.file-upload.post-method.php only has data when uploading files in POST. Refer to Example #3 on the help page.
$ _ COOKIE and $ _ SESSION are used for SESSION control.
?
In addition, to customize the value in $ _ SERVER, you only need to add some common variables (mostly used for clusters) in fastcgi_params ). Add the following code:
Fastcgi_param? DB4_USER ?? Root;
Fastcgi_param? DB4_PASS? ? "";
Fastcgi_param? DB4_HOST ?? Localhost;
Fastcgi_param? DB4_PORT ?? 3306;
Fastcgi_param? DB4_NAME ?? Test;
?
Then, get the current environment variable value root in $ _ SERVER ["DB4_USER.