?? configuration.html
字號:
<!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="install.html">Installation and Configuration</a></div> <div class="next" style="text-align: right; float: right;"><a href="configuration.changes.html">How to change configuration settings</a></div> <div class="up"><a href="install.html">Installation and Configuration</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <h1>Runtime Configuration</h1><h2>Table of Contents</h2><ul class="chunklist chunklist_chapter"><li><a href="configuration.changes.html">How to change configuration settings</a></li></ul> <div id="configuration.file" class="sect1"> <h2 class="title">The configuration file</h2> <p class="simpara"> The configuration file (<var class="filename">php.ini</var>) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the <acronym title="Common Gateway Interface">CGI</acronym> and <acronym title="Command Line Interpreter/Interface">CLI</acronym> version, it happens on every invocation. </p> <p class="para"> <var class="filename">php.ini</var> is searched in these locations (in order): <ul class="itemizedlist"> <li class="listitem"> <p class="para"> SAPI module specific location (<i>PHPIniDir</i> directive in Apache 2, <i>-c</i> command line option in CGI and CLI, <i>php_ini</i> parameter in NSAPI, <i>PHP_INI_PATH</i> environment variable in THTTPD) </p> </li> <li class="listitem"> <p class="para"> The <var class="varname">PHPRC</var> environment variable. Before PHP 5.2.0 this was checked after the registry key mentioned below. </p> </li> <li class="listitem"> <p class="para"> As of PHP 5.2.0, the following registry locations are searched in order: <i>HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath</i>, <i>HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath</i> and <i>HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath</i>, where x, y and z mean the PHP major, minor and release versions. </p> </li> <li class="listitem"> <p class="para"> <i>HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath</i> (Windows Registry location) </p> </li> <li class="listitem"> <p class="para"> Current working directory (except CLI) </p> </li> <li class="listitem"> <p class="para"> The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows) </p> </li> <li class="listitem"> <p class="para"> Windows directory (<var class="filename">C:\windows</var> or <var class="filename">C:\winnt</var>) (for Windows), or <i>--with-config-file-path</i> compile time option </p> </li> </ul> </p> <p class="para"> If <var class="filename">php-SAPI.ini</var> exists (where SAPI is used SAPI, so the filename is e.g. <var class="filename">php-cli.ini</var> or <var class="filename">php-apache.ini</var>), it's used instead of <var class="filename">php.ini</var>. SAPI name can be determined by <a href="function.php-sapi-name.html" class="function">php_sapi_name()</a>. </p> <blockquote><p><b class="note">Note</b>: The Apache web server changes the directory to root at startup causing PHP to attempt to read <var class="filename">php.ini</var> from the root filesystem if it exists. <br /> </p></blockquote> <p class="para"> The <var class="filename">php.ini</var> directives handled by extensions are documented respectively on the pages of the extensions themselves. The <a href="ini.html" class="link">list of the core directives</a> is available in the appendix. Probably not all PHP directives are documented in the manual though. For a complete list of directives available in your PHP version, please read your well commented <var class="filename">php.ini</var> file. Alternatively, you may find the <a href="http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?view=co" class="link external">» the latest <var class="filename">php.ini</var></a> from CVS helpful too. </p> <p class="para"> <div class="example"> <p><b>Example #1 <var class="filename">php.ini</var> example</b></p> <div class="example-contents"><div class="cdata"><pre>; any text on a line after an unquoted semicolon (;) is ignored[php] ; section markers (text within square brackets) are also ignored; Boolean values can be set to either:; true, on, yes; or false, off, no, noneregister_globals = offtrack_errors = yes; you can enclose strings in double-quotesinclude_path = ".:/usr/local/lib/php"; backslashes are treated the same as any other characterinclude_path = ".;c:\php\lib"</pre></div></div> </div> </p> <p class="para"> Since PHP 5.1.0, it is possible to refer to existing .ini variables from within .ini files. Example: <i>open_basedir = ${open_basedir} ":/new/dir"</i>. </p> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="install.html">Installation and Configuration</a></div> <div class="next" style="text-align: right; float: right;"><a href="configuration.changes.html">How to change configuration settings</a></div> <div class="up"><a href="install.html">Installation and Configuration</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -