📄 ini.core.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Description of core php.ini directives</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="ini.html">php.ini directives</a></div> <div class="next" style="text-align: right; float: right;"><a href="extensions.html">Extension Categorization</a></div> <div class="up"><a href="ini.html">php.ini directives</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="ini.core" class="section"> <h2 class="title">Description of core <var class="filename">php.ini</var> directives</h2> <p class="para"> This list includes the core <var class="filename">php.ini</var> directives you can set to configure your PHP setup. Directives handled by extensions are listed and detailed at the extension documentation pages respectively; Information on the session directives for example can be found at the <a href="ref.session.html" class="link">sessions page</a>. </p> <div id="ini.sect.httpd-options" class="section"> <h2 class="title">Httpd Options</h2> <p class="para"> <table border="5"> <caption><b>Httpd 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">async_send</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> </tbody> </colgroup> </table> </p> <p class="para"> </p> </div> <div id="ini.sect.language-options" class="section"> <h2 class="title">Language Options</h2> <p class="para"> <table border="5"> <caption><b>Language and Misc 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">short_open_tag</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_ALL in PHP <= 4.0.0. PHP_INI_PERDIR in PHP < 5.3.0</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">asp_tags</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_PERDIR</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL in PHP <= 4.0.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">precision</td> <td colspan="1" rowspan="1" align="left">"14"</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">y2k_compliance</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">allow_call_time_pass_reference</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_PERDIR</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL in PHP <= 4.0.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">expose_php</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left"><var class="filename">php.ini</var> only</td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">zend.ze1_compatibility_mode</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 5.0.0. Removed in PHP 5.3.0</td> </tr> </tbody> </colgroup> </table> </p> <p class="para">Here's a short explanation ofthe configuration directives.</p> <p class="para"> <dl> <dt id="ini.short-open-tag"> <span class="term"> <i><tt class="parameter">short_open_tag</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Tells whether the short form (<strong class="userinput"><code><? ?></code></strong>) of PHP's open tag should be allowed. If you want to use PHP in combination with XML, you can disable this option in order to use <strong class="userinput"><code><?xml ?></code></strong> inline. Otherwise, you can print it with PHP, for example: <strong class="userinput"><code><?php echo '<?xml version="1.0"'; ?></code></strong>. Also if disabled, you must use the long form of the PHP open tag (<strong class="userinput"><code><?php ?></code></strong>). </p> <blockquote><p><b class="note">Note</b>: This directive also affects the shorthand <strong class="userinput"><code><?=</code></strong>, which is identical to <strong class="userinput"><code><? echo</code></strong>. Use of this shortcut requires <code class="systemitem systemitem">short_open_tag</code> to be on. <br /> </p></blockquote> </dd> </dt> <dt id="ini.asp-tags"> <span class="term"> <i><tt class="parameter">asp_tags</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="simpara"> Enables the use of ASP-like <% %> tags in addition to the usual <?php ?> tags. This includes the variable-value printing shorthand of <%= $value %>. For more information, see <a href="language.basic-syntax.html#language.basic-syntax.phpmode" class="link">Escaping from HTML</a>. </span> </dd> </dt> <dt id="ini.precision"> <span class="term"> <i><tt class="parameter">precision</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <span class="simpara"> The number of significant digits displayed in floating point numbers. </span> </dd> </dt> <dt id="ini.y2k-compliance"> <span class="term"> <i><tt class="parameter">y2k_compliance</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="simpara"> Enforce year 2000 compliance (will cause problems with non-compliant browsers) </span> </dd> </dt> <dt id="ini.allow-call-time-pass-reference"> <span class="term"> <i><tt class="parameter">allow_call_time_pass_reference</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Whether to warn when arguments are passed by reference at function call time. This method is deprecated and is likely to be unsupported in future versions of PHP/Zend. The encouraged method of specifying which arguments should be passed by reference is in the function declaration. You're encouraged to try and turn this option Off and make sure your scripts work properly with it in order to ensure they will work with future versions of the language (you will receive a warning each time you use this feature). </p> <p class="para"> Passing arguments by reference at function call time was deprecated for code cleanliness reason. Function can modify its argument in undocumented way if it didn't declared that the argument is passed by reference. To prevent side-effects it's better to specify which arguments are passed by reference in function declaration only. </p> <p class="para"> See also <a href="language.references.html" class="link">References Explained</a>. </p> </dd> </dt> <dt id="ini.expose-php"> <span class="term"> <i><tt class="parameter">expose_php</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Decides whether PHP may expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). It is no security threat in any way, but it makes it possible to determine whether you use PHP on your server or not. </p> </dd> </dt> <dt id="ini.zend.ze1-compatibility-mode"> <span class="term"> <i><tt class="parameter">zend.ze1_compatibility_mode</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Enable compatibility mode with Zend Engine 1 (PHP 4). It affects the cloning, casting (objects with no properties cast to <b><tt>FALSE</tt></b> or 0), and <a href="language.oop5.object-comparison.html" class="link">comparing of objects</a>. In this mode, objects are passed by value instead of reference by default. </p> <p class="para"> See also the section titled <a href="migration5.html" class="link">Migrating from PHP 4 to PHP 5</a>. </p> </dd> </dt> </dl> </p> </div> <div id="ini.sect.resource-limits" class="section"> <h2 class="title">Resource Limits</h2> <p class="para"> <table border="5"> <caption><b>Resource Limits</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">memory_limit</td> <td colspan="1" rowspan="1" align="left">"128M"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">"8M" before PHP 5.2.0, "16M" in PHP 5.2.0</td> </tr> </tbody> </colgroup> </table> </p> <p class="para">Here's a short explanation ofthe configuration directives.</p> <p class="para"> <dl> <dt id="ini.memory-limit"> <span class="term"> <i><tt class="parameter">memory_limit</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <p class="para"> This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to <i>-1</i>. </p> <p class="para"> Prior to PHP 5.2.1, in order to use this directive it had to be enabled at compile time by using <span class="option">-enable-memory-limit</span> in the configure line. This was also required to define the functions <a href="function.memory-get-usage.html" class="function">memory_get_usage()</a> and <a href="function.memory-get-peak-usage.html" class="function">memory_get_peak_usage()</a>. </p> <span class="simpara">When an <a href="language.types.integer.html" class="type integer">integer</a> is used, the value is measured in bytes. Shorthand notation, as described in <a href="faq.using.html#faq.using.shorthandbytes" class="link">this FAQ</a>, may also be used.</span> </dd> </dt> </dl> </p> <p class="para"> See also: <a href="info.configuration.html#ini.max-execution-time" class="link">max_execution_time</a>. </p> </div> <div id="ini.sect.performance" class="section"> <h2 class="title">Performance Tuning</h2> <p class="para"> <table border="5"> <caption><b>Performance Tuning</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">realpath_cache_size</td> <td colspan="1" rowspan="1" align="left">"16K"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Available since PHP 5.1.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">realpath_cache_ttl</td> <td colspan="1" rowspan="1" align="left">"120"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Available since PHP 5.1.0.</td> </tr> </tbody> </colgroup>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -