info.configuration.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 396 行
HTML
396 行
<!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="info.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="info.resources.html">Resource Types</a></div> <div class="up"><a href="info.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="info.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>PHP Options/Inf 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">assert.active</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">assert.bail</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">assert.warning</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">assert.callback</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">assert.quiet_eval</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">enable_dl</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 6.0.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">max_execution_time</td> <td colspan="1" rowspan="1" align="left">"30"</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">max_input_time</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">Available since PHP 4.3.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">max_input_nesting_level</td> <td colspan="1" rowspan="1" align="left">"64"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_PERDIR</td> <td colspan="1" rowspan="1" align="left">Available since PHP 4.4.8. Removed in PHP 5.0.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">magic_quotes_gpc</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.2.3. Removed in PHP 6.0.0.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">magic_quotes_runtime</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">Removed in PHP 6.0.0.</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.assert.active"> <span class="term"> <i><tt class="parameter">assert.active</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Enable <a href="function.assert.html" class="function">assert()</a> evaluation. </p> </dd> </dt> <dt id="ini.assert.bail"> <span class="term"> <i><tt class="parameter">assert.bail</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Terminate script execution on failed assertions. </p> </dd> </dt> <dt id="ini.assert.warning"> <span class="term"> <i><tt class="parameter">assert.warning</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Issue a PHP warning for each failed assertion. </p> </dd> </dt> <dt id="ini.assert.callback"> <span class="term"> <i><tt class="parameter">assert.callback</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <p class="para"> user function to call on failed assertions </p> </dd> </dt> <dt id="ini.assert.quiet-eval"> <span class="term"> <i><tt class="parameter">assert.quiet_eval</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> Use the current setting of <a href="function.error-reporting.html" class="function">error_reporting()</a> during assertion expression evaluation. If enabled, no errors are shown (implicit error_reporting(0)) while evaluation. If disabled, errors are shown according to the settings of <a href="function.error-reporting.html" class="function">error_reporting()</a> </p> </dd> </dt> <dt id="ini.enable-dl"> <span class="term"> <i><tt class="parameter">enable_dl</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <p class="para"> This directive is really only useful in the Apache module version of PHP. You can turn dynamic loading of PHP extensions with <a href="function.dl.html" class="function">dl()</a> on and off per virtual server or per directory. </p> <p class="para"> The main reason for turning dynamic loading off is security. With dynamic loading, it's possible to ignore all <a href="features.safe-mode.html#ini.open-basedir" class="link">open_basedir</a> restrictions. The default is to allow dynamic loading, except when using <a href="features.safe-mode.html#ini.safe-mode" class="link">safe mode</a>. In <a href="features.safe-mode.html#ini.safe-mode" class="link">safe mode</a>, it's always impossible to use <a href="function.dl.html" class="function">dl()</a>. </p> </dd> </dt> <dt id="ini.max-execution-time"> <span class="term"> <i><tt class="parameter">max_execution_time</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <p class="para"> This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is <i>30</i>. When running PHP from the <a href="features.commandline.html" class="link">command line</a> the default setting is <i>0</i>. </p> <p class="para"> The maximum execution time is not affected by system calls, stream operations etc. Please see the <a href="function.set-time-limit.html" class="function">set_time_limit()</a> function for more details. </p> <p class="para"> You can not change this setting with <a href="function.ini-set.html" class="function">ini_set()</a> when running in <a href="features.safe-mode.html#ini.safe-mode" class="link">safe mode</a>. The only workaround is to turn off safe mode or by changing the time limit in the <var class="filename">php.ini</var>. </p> <p class="para"> Your web server can have other timeout configurations that may also interrupt PHP execution. Apache has a <i>Timeout</i> directive and IIS has a CGI timeout function. Both default to 300 seconds. See your web server documentation for specific details. </p> </dd> </dt> <dt id="ini.max-input-time"> <span class="term"> <i><tt class="parameter">max_input_time</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <p class="para"> This sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads. </p> </dd> </dt> <dt id="ini.max-input-nesting-level"> <span class="term"> <i><tt class="parameter">max_input_nesting_level</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <p class="para"> Sets the max nesting depth of <a href="language.variables.external.html" class="link">input variables</a> (i.e. <var class="varname"><a href="reserved.variables.get.html" class="classname">$_GET</a></var>, <var class="varname"><a href="reserved.variables.post.html" class="classname">$_POST</a></var>..) </p> </dd> </dt> <dt id="ini.magic-quotes-gpc"> <span class="term"> <i><tt class="parameter">magic_quotes_gpc</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <div class="warning"><b class="warning">Warning</b><p class="simpara">This feature has been<em class="emphasis">DEPRECATED</em> and <em class="emphasis">REMOVED</em> as of PHP 6.0.0.Relying on this feature is highly discouraged.</p></div> <p class="para"> Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. </p> <blockquote><p><b class="note">Note</b>: In PHP 4, also <var class="varname"><a href="reserved.variables.environment.html" class="classname">$_ENV</a></var> variables are escaped. <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: If the <a href="sybase.configuration.html#ini.magic-quotes-sybase" class="link"> magic_quotes_sybase</a> directive is also ON it will completely override magic_quotes_gpc. Having both directives enabled means only single quotes are escaped as <em class="emphasis">''</em>. Double quotes, backslashes and NUL's will remain untouched and unescaped. <br /> </p></blockquote> <p class="para"> See also <a href="function.get-magic-quotes-gpc.html" class="function">get_magic_quotes_gpc()</a> </p> </dd> </dt> <dt id="ini.magic-quotes-runtime"> <span class="term"> <i><tt class="parameter">magic_quotes_runtime</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <div class="warning"><b class="warning">Warning</b><p class="simpara">This feature has been<em class="emphasis">DEPRECATED</em> and <em class="emphasis">REMOVED</em> as of PHP 6.0.0.Relying on this feature is highly discouraged.</p></div> <p class="para"> If <i><tt class="parameter">magic_quotes_runtime</tt></i> is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash. If <a href="sybase.configuration.html#ini.magic-quotes-sybase" class="link">magic_quotes_sybase</a> is also on, a single-quote is escaped with a single-quote instead of a backslash. </p> </dd> </dt> </dl> </p></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="info.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="info.resources.html">Resource Types</a></div> <div class="up"><a href="info.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?