If you encounter php that does not display errors, it may be that the error prompts are turned off in your php.ini. The solution is very simple. We just need to change the display_error = off in php.ini to on.
Solution
1.
in php.inierror_reporting = E_ALL & ~E_NOTICE
And remove the previous comment;
2. In php.ini
display_error = off
changed to
display_error = On.
Then restart apache
If on is originally set in your php.ini but still no error is reported, then we need to see if the program blocks the error. If so, just remove it.