Home > Article > Backend Development > The php page does not prompt an error
#What should I do if the php page does not prompt an error?
How to enable error prompt output in PHP:
The steps to enable it are as follows:
1. Open php. ini file.
Take ubuntu as an example. This file is in the /etc/php5/apache2 directory.
2. Search and modify the following line, change the Off value to On
display_errors = Off
3. Search for the following line
error_reporting = E_ALL & ~E_NOTICE
or search:
error_reporting = E_ALL & ~E_DEPRECATED
and change it to
error_reporting = E_ALL | E_STRICT
4. Modify Apache's httpd.conf,
Take Ubuntu as an example. This file is in the /etc/apache2/ directory. This is a blank file.
Add the following two lines:
php_flag display_errors on php_value error_reporting 2039
5. Restart Apache and it will be OK.
Restart command:
sudo /etc/init.d/apache2 restart.
For more PHP related knowledge, please visit PHP Tutorial!
The above is the detailed content of The php page does not prompt an error. For more information, please follow other related articles on the PHP Chinese website!