Php page blank we start with several methods, one is that php closes the error reminder function, the other is that the program does not return results, of course, if php is used to operate the database, we can report errors to the database and make no judgment. here we will analyze these three methods for you... php page blank we start with several methods, one is that php closes the error reminder function, the other is that the program does not return results, of course, if php is used to operate the database, we can report errors to the database without judgment. here we will analyze the three methods for you to solve the problem of no errors on the php page.
1. php program does not report an error
For windows, find the php under the apache installation directory. ini, display_errors = Off changed to display_errors = On, linux system PHP configuration file path:/uer/local/php/etc/php. ini
Display_errors = Off to display_errors = On
Is there a program that includes:
Error_reporting = E_ALL;/* The strictest error reporting level, which can be enabled during development */
Error_reporting = E_ALL &~ E_NOTICE/* errors other than notice */
Error_reporting = E_ERROR | E_PARSE | e_CORE_ERROR/* only the fatal runtime error is considered. new parsing error
If they exist, cancel them.
2. no results are returned for php program executionThe sample code is as follows:
function abc() { echo 'http://www.phprm.com'; }
You can directly execute the page as a blank page. we need to execute the call function.
Echo abc.
3. Database SQL errorBut no error report prompt is provided. the sample code is as follows:
$sql ="select * from a where aaaaf=ccc ";mysql_query( $sql );
In this way, if an SQL execution error occurs, but no error occurs, we only need to add mysql_error.
$sql ="select * from a where aaaaf=ccc ";mysql_query( $sql ) or die(mysql_error());
Friendly reminder: some time may be due to page encoding errors or blank pages, but the error reminder function is still displayed.
Tutorial address:
Reprinted! But please include the article address ^