Home > Article > Backend Development > How to enable error reporting in php
ph method to enable error prompts: 1. Find and open the configuration file "php.ini" in the PHP installation directory; 2. Find the "display_errors=" item in the file and set its value to "On "; 3. Save the file and restart the apache service.
The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
In the process of development, It is best to turn on the error message. For some errors, if you do not turn on the error prompt, the error prompt may not appear. This will not achieve technical rigor.
Let’s turn on the error message of PHP
1. Find and open the configuration file php.ini in the PHP installation directory
## 2 , search in the file,display_errors=
display_errors=OnOff means the error prompt is off
display_errors=Off
Example demonstration, defining an incorrect PHP syntax
When previewing in the browser, it cannot print correctly, but no error is reported, Because the current
display_errors=Off, the error prompt is not turned on
display_errors=On
PHP Video Tutorial"
The above is the detailed content of How to enable error reporting in php. For more information, please follow other related articles on the PHP Chinese website!