Home > Article > Backend Development > What should I do if the php webpage jumps to a blank page?
Solution for php webpage to jump to a blank page: 1. Check and modify the database configuration file; 2. Check the error message through "error_reporting(E_ALL);" and modify it; 3. Clear the program cache.
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
php What should I do if the webpage jumps to a blank page?
Common solutions to open blank PHP websites
1. Incorrect database configuration information causes
Check the database configuration file to see if the database The information is incorrect. If the information is incorrect, just correct it. Common open source programs and database configuration files are:
WordPress:wp-config.php Discuz: config/config_global.php config/config_ucenter.php Dede(织梦):data/common.inc.php Thinkphp: common/convention.php Ecshop: data/config.php
2. If a program error causes
, you can add error_reporting(E_ALL); at the top of the blank page and then visit the page to see Go to the error prompt and debug the program according to the prompt
Sample code:
<?php error_reporting(E_ALL); ?>
3. Caching problem
Some programs will cause the website to be blank when the cache file is too large. , when this kind of problem occurs, the general website backend can still be accessed, just clear the program cache after logging in to the backend.
Some website programs will generate a static page, and due to various reasons during generation, the size of the generated homepage file index.html is 0kb and has no content, resulting in a blank access. Generally, delete the generated index.html and then visit the website to generate it again.
4. Notes
When modifying a file, please remember to back up the file first to avoid modification errors that may lead to unrecoverable changes.
When modifying database information, be sure to use a dedicated text editor such as notepad, editplus, etc. Errors caused by coding problems will occur when using Notepad
Recommended study: "PHP Video Tutorial"
The above is the detailed content of What should I do if the php webpage jumps to a blank page?. For more information, please follow other related articles on the PHP Chinese website!