For example, php. ini has two error display options: display_errors and display_startup_errors. you are advised to give an example. For example, php. ini has two error display options: display_errors and display_startup_errors. you are advised to give an example.
Reply content:
For example, php. ini has two error display options: display_errors and display_startup_errors. you are advised to give an example.
Please refer to the manual
Http://php.net/manual/zh/errorfunc.configuration.php
View the php configuration file and you will see a lot of incorrect configurations,
Display_errors
Disable PHP errors. when this configuration is Off, all error messages are not displayed.
Default Value: off, Production Value: Off, and Development Value: On
You can change the configuration value to support runtime configuration.ini_set('display_errors', 1)To enable
Document address
Error_reporting
Set the error report Level. common error levels include:
| Value |
Description |
| E_ALL |
Show all error reports |
| E_ERROR |
Displays a fatal error that causes the script to end. |
| E_WARNING |
General warnings, such as method expiration |
| E_NOTICE |
Undefined common variables or undefined array indexes |
// Display all errors except E_NOTICE, E_STRICT, and E_DEPRECATED. Default Value: E_ALL &~ E_NOTICE &~ E_STRICT &~ E_DEPRECATEDDevelopment Value: E_ALLProduction Value: E_ALL &~ E_DEPRECATED &~ E_STRICT
Runtime changes:
Error_reporting (0); // disable error report error_reporting (E_ALL); // display all error reports error_reporting (E_ALL &~ E_DEPRECATED); // display all other errors except E_DEPRECATED
Document address
Log_errors
Set whether to record the error information of script running to the server error log or error_log. Note that this is a specific configuration item related to the server
Default Value: Off
Development Value: On
Production Value: On
Track_errors
If enabled, the last error will always exist in the variable $ php_errormsg.
Default Value: Off
Development Value: On
Production Value: Off
Html_errors
The error message is displayed in HTML format.
Default Value: On
Development Value: On
Production value: On