Tag Archives: error_reporting(E_ALL);

[Solved] ini_set(“display_errors”,”On”); & error_reporting(E_ALL);

When using PHP to do website development, in order to prevent users from seeing error messages, the unfriendly interface appears. Therefore, it is generally set in php.ini:

display_ errors = Off;
However, sometimes we need to open error messages during development. At this time, you can set the following in the PHP file:

ini_ set("display_errors","On");
error_ reporting(E_ ALL);

However, sometimes we can’t display the syntax errors in PHP even if we set it like this in time

solution:
suppose there are syntax errors in this PHP file.
you can create a new test.php and edit it in this PHP as follows:
ini_ set(“display_ errors”,”On”);
error_ reporting(E_ ALL);
include (“target file”)

error_ reporting(“E_All “) and ini_set(“display_errors” and “on”),  What is the difference?

If the latter is off, the former is useless even for e-all