What errors are displayed by display_startup_errors=on in php.ini?

WBOY
Release: 2016-08-04 09:21:41
Original
2113 people have browsed it

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.

Reply content:

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,

display_errors

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)

Document address

error_reporting

Set the level of error reporting. Common error levels are

valueInstructionsE_ALLShow all error reportsE_ERRORShows fatal errors that cause the script to endE_WARNINGGeneral warnings, such as methods being outdated, etc. E_NOTICECommon variables are undefined or array indexes are undefined
<code>//显示除去E_NOTICE、E_STRICT、E_DEPRECATED外的所有错误

默认值 Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
Development Value: E_ALL
Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
</code>
Copy after login
Runtime changes:

<code class="php">    error_reporting(0);//禁用错误报告
    error_reporting(E_ALL);//显示所有错误报告
    error_reporting(E_ALL & ~E_DEPRECATED );//显示除去E_DEPRECATED 外的其他所有错误</code>
Copy after login
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 will be displayed on the page in HTML format

Default Value: On

Development Value: On
Production value: On

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template