How to open the php error code prompt: first back up the php configuration file; then open the php.ini file; then change "display_errors=Off" to "On"; and finally restart the apache service.
The operating environment of this tutorial: linux5.9.8 system, PHP5.6 version. This method is suitable for all brands of computers.
Recommended: "PHP Video Tutorial"
php Open error code prompt
Prerequisite environment: Linux Apache2 mysql php
When debugging php, if the newly built environment does not have an error message when running the php web application, you need to manually open it
Method:
Back up php first Configuration file
cp /etc/php5/apache2/php.ini /etc/php5/apche2/php.ini.bak
Open the php.ini file
vim /etc/php5/apache2/php.ini
Then enter '/' in the terminal to enter the search state
Enter the search keyword display_errors, press Enter to search and press n to proceed Search down
Change display_errors = Off to On
Press i to enter insert mode and make modifications
After completion, press ESC to exit the insert Mode and then press: wq to save
Then enter '/' in the terminal to enter the search state
Enter the search keyword error_reporting, press Enter to search and press n to proceed Search down
The steps are the same as above
I added & ~E_NOTICE here, which means ignore all Notice warnings and do not report them,
Add or output the error message you want to block based on your actual situation
Then: wq save the file
Finally you need to restart the apache service
/etc/init.d/apache2 restart
or
service apache2 restart
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of How to open php error code prompt. For more information, please follow other related articles on the PHP Chinese website!