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
Similar Posts:
- On the program error and level ini_ set(“display_ errors”,”On”)
- The difference between system.err.println and system.out.println
- C write and read file via FILE and open method in a+ or r mode
- [Solved] VS winsock.h and ws2def.h a large number of redefined error
- com.alibaba.fastjson.JSONException: syntax error, expect {, actual [, pos 0
- Syntax error: word unexpected (expect
- Makefile:xxx: recipe for target ‘xxx’ failed
- PHP use$_ SERVER[‘PHP_ Self ‘] to get the current page address and its security issues
- PHP Fatal error: Cannot redeclare class
- E-mail Send 535 error: authentication failed [How to Solve]