Home > Article > Backend Development > php settings error
PHP’s error reporting function is of great benefit to development and debugging. It can help developers quickly find the cause of errors. How can I enable error reporting?
Recommendation: php server
Use PHP configuration file, php.ini to enable error prompts
Search in the file, display_errors=
On means the error prompt is on
display_errors=On
Off means the error prompt is off
display_errors=Off
Example demonstration, defining an incorrect PHP syntax
When previewing in the browser, it cannot print correctly, but no error is reported,
because the current display_errors=Off, the error prompt is not turned on
Enable PHP error prompt, set:
display_errors=On
and save it New settings for the file
#After saving the settings, restart the apache service again
The above is the detailed content of php settings error. For more information, please follow other related articles on the PHP Chinese website!