Home  >  Article  >  Backend Development  >  php settings error

php settings error

尚
Original
2019-10-28 13:20:093406browse

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

php settings error

Example demonstration, defining an incorrect PHP syntax

php settings error

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

php settings error

Enable PHP error prompt, set:

display_errors=On

and save it New settings for the file

php settings error

#After saving the settings, restart the apache service again

php settings error

php settings error

The above is the detailed content of php settings error. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn