Home >Backend Development >PHP Problem >What should I do if the php webpage jumps to a blank page?

What should I do if the php webpage jumps to a blank page?

藏色散人
藏色散人Original
2021-09-14 09:32:505606browse

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.

What should I do if the php webpage jumps to a blank page?

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!

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