The method to open PHP error report is for your reference.
There are many configuration settings in the php.ini file. You should have your own php.ini file set up and put it in the appropriate directory, as shown in the documentation for installing PHP and Apache 2 on Linux.
When debugging a PHP application, you should know two configuration variables. Here are the two variables and their default values:
The code copy is as follows:
display_errors = Off error_reporting = E_ALL
By searching them in the php.ini file, you can find the current default values of these two variables. The purpose of the display_errors variable is obvious - it tells PHP whether to display an error. The default value is Off. However, to make the development process easier, set this value to On: display_errors = On
The default value of the error_reporting variable is E_ALL. This setting displays everything from bad coding practices to harmless prompts to errors. E_ALL is a bit too nuanced for the development process, as it also displays prompts on the screen for small things (such as variables not initialized) that messes up the browser's output. I just want to see errors and bad coding practices, but not harmless tips. So, please use the following value instead of the default value of error_reporting: error_reporting = E_ALL & ~E_NOTICE
Restart Apache and the configuration is complete.