Home >Backend Development >PHP Tutorial >What errors are displayed by display_startup_errors=on in php.ini?
As the title states, there are two error display options in php.ini, display_errors and display_startup_errors. What kind of errors do they display respectively? It is best to give an example. Please give me some advice. Thank you.
As the title states, there are two error display options in php.ini, display_errors and display_startup_errors. What kind of errors do they display respectively? It is best to give an example. Please give me some advice. Thank you.
Please refer to the manual
http://php.net/manual/zh/errorfunc.configuration.php
Look at the php configuration file, you will see a lot of incorrect configurations,
Whether to disable PHP errors, when Off this configuration, all error messages will not be displayed
The default value is off, Production Value: Off, Development Value: On
Change the configuration value to support runtime configuration, which can be enabled in the script via ini_set('display_errors', 1)
error_reporting
Instructions | |
---|---|
Show all error reports | |
Shows fatal errors that cause the script to end | |
General warnings, such as methods being outdated, etc. | |
Common variables are undefined or array indexes are undefined |
<code class="php"> error_reporting(0);//禁用错误报告 error_reporting(E_ALL);//显示所有错误报告 error_reporting(E_ALL & ~E_DEPRECATED );//显示除去E_DEPRECATED 外的其他所有错误</code>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 serverDefault Value: Off
Development Value: On
Production Value: On
Default Value: Off
Development Value: On
Production Value: Off
Default Value: On
Development Value: On
Production value: On