errorfunc.configuration.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 555 行 · 第 1/2 页
HTML
555 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Runtime Configuration</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="errorfunc.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="errorfunc.resources.html">Resource Types</a></div> <div class="up"><a href="errorfunc.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="errorfunc.configuration" class="section"> <h2 class="title">Runtime Configuration</h2> <p class="simpara">The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.</p> <p class="para"> <table border="5"> <caption><b>Errors and Logging Configuration Options</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Name</th> <th colspan="1">Default</th> <th colspan="1">Changeable</th> <th colspan="1">Changelog</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">error_reporting</td> <td colspan="1" rowspan="1" align="left">NULL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">display_errors</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">display_startup_errors</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">log_errors</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">log_errors_max_len</td> <td colspan="1" rowspan="1" align="left">"1024"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Available since PHP 4.3.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ignore_repeated_errors</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Available since PHP 4.3.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ignore_repeated_source</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Available since PHP 4.3.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">report_memleaks</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Available since PHP 4.3.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">track_errors</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">html_errors</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM in PHP <= 4.2.3.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">docref_root</td> <td colspan="1" rowspan="1" align="left">""</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Available since PHP 4.3.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">docref_ext</td> <td colspan="1" rowspan="1" align="left">""</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Available since PHP 4.3.2.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">error_prepend_string</td> <td colspan="1" rowspan="1" align="left">NULL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">error_append_string</td> <td colspan="1" rowspan="1" align="left">NULL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">error_log</td> <td colspan="1" rowspan="1" align="left">NULL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td class="empty"> </td> </tr> </tbody> </colgroup> </table> For further details and definitions of the PHP_INI_* constants, see the <a href="ini.html" class="xref">php.ini directives</a>. </p> <p class="para">Here's a short explanation ofthe configuration directives.</p> <p class="para"> <dl> <dt id="ini.error-reporting"> <span class="term"> <i><tt class="parameter">error_reporting</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <p class="para"> Set the error reporting level. The parameter is either an integer representing a bit field, or named constants. The error_reporting levels and constants are described in <a href="errorfunc.constants.html" class="link">Predefined Constants</a>, and in <var class="filename">php.ini</var>. To set at runtime, use the <a href="function.error-reporting.html" class="function">error_reporting()</a> function. See also the <a href="errorfunc.configuration.html#ini.display-errors" class="link">display_errors</a> directive. </p> <p class="para"> In PHP 4 and PHP 5 the default value is E_ALL & ~E_NOTICE. This setting does not show <b><tt>E_NOTICE</tt></b> level errors. You may want to show them during development. </p> <blockquote><p><b class="note">Note</b>: Enabling <b><tt>E_NOTICE</tt></b> during development has some benefits. For debugging purposes: NOTICE messages will warn you about possible bugs in your code. For example, use of unassigned values is warned. It is extremely useful to find typos and to save time for debugging. NOTICE messages will warn you about bad style. For example, $arr[item] is better to be written as $arr['item'] since PHP tries to treat "item" as constant. If it is not a constant, PHP assumes it is a string index for the array. <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: In PHP 5 a new error level <b><tt>E_STRICT</tt></b> is available. As <b><tt>E_STRICT</tt></b> is not included within <b><tt>E_ALL</tt></b> you have to explicitly enable this kind of error level. Enabling <b><tt>E_STRICT</tt></b> during development has some benefits. STRICT messages will help you to use the latest and greatest suggested method of coding, for example warn you about using deprecated functions. <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: <b>PHP Constants outside of PHP</b><br /> Using PHP Constants outside of PHP, like in <var class="filename">httpd.conf</var>, will have no useful meaning so in such cases the <a href="language.types.integer.html" class="type integer">integer</a> values are required. And since error levels will be added over time, the maximum value (for <b><tt>E_ALL</tt></b>) will likely change. So in place of <b><tt>E_ALL</tt></b> consider using a larger value to cover all bit fields from now and well into the future, a numeric value like <i>2147483647</i>. <br /> </p></blockquote> </dd> </dt> <dt id="ini.display-errors"> <span class="term"> <i><tt class="parameter">display_errors</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <p class="para"> This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user. </p> <p class="para"> Value "stderr" sends the errors to <i>stderr</i> instead of <i>stdout</i>. The value is available as of PHP 5.2.4. In earlier versions, this directive was of type <a href="language.types.boolean.html" class="type boolean">boolean</a>. </p> <blockquote><p><b class="note">Note</b>: This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet). <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: Although display_errors may be set at runtime (with <a href="function.ini-set.html" class="function">ini_set()</a>), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed. <br /> </p></blockquote> </dd> </dt> <dt id="ini.display-startup-errors"> <span class="term"> <i><tt class="parameter">display_startup_errors</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed. It's strongly recommended to keep display_startup_errors off, except for debugging. </p> </dd> </dt> <dt id="ini.log-errors"> <span class="term"> <i><tt class="parameter">log_errors</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?