disabling error Reporting
error_reporting (0);
#orini_set("Display_errors", "Off");
Turn On Error Reporting
Ini_set ("Display_errors", "on");
#or error_reporting (e_all);
When using PHP to do web site development, in order to prevent users from seeing the error message, and the appearance of the unfriendly interface. Therefore general will be set in php.ini:
Display_errors = OFF;
However, at the time of development, we sometimes need to open the error message. At this point, you can set the following in the PHP file:
1. Ini_set ("Display_errors", "on");
2. error_reporting (E_all);
But sometimes we set this up in time or we can't show the syntax errors in PHP.
This is because the PHP file syntax error causes the file to not be executed at all, so of course the error message is not displayed
Workaround:
Suppose there's a syntax error in this PHP.
You can create a new display_errors.php
Then edit the following in the PHP:
Ini_set ("Display_errors", "on");
Error_reporting (E_all);
Include ("Target file");
This way, when you run display_errors.php, the program will report the error syntax.
What is the difference between error_reporting ("E_all") and Ini_set ("Display_errors", "on")?
The latter is more than the former, the latter is off, the former even E-all is useless
PHP page Disable Error Reporting