Home >Backend Development >PHP Tutorial >Blank page problem occurs when fastcgi_param runs php under nginx

Blank page problem occurs when fastcgi_param runs php under nginx

WBOY
WBOYOriginal
2016-07-25 09:03:411196browse
  1. fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name;
  2. fastcgi_param QUERY_STRING $query_string;
Copy code

Parameter SCRIPT_FILENAME is used by PHP for determining the name of script to execute, and QUERY_STRING contains the parameters of the request.

So, when the SCRIPT_FILENAME system variable is not defined, PHP cannot interpret and execute it.

The definition of this variable can be written in the nginx configuration file nginx.conf, or it can be written in an external file, and then included in nginx.conf using include. Articles you may be interested in: Solution to the problem that nginx+php-fpm page displays blank About the organizational structure of nginx+php-fpm configuration file When running php program under nginx, 200 is returned, but the page is blank



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