phar.configuration.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 210 行

HTML
210
字号
<!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="phar.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.resources.html">Resource Types</a></div> <div class="up"><a href="phar.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="phar.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>Filesystem and Streams 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">phar.readonly</td>      <td colspan="1" rowspan="1" align="left">&quot;1&quot;</td>      <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td>      <td class="empty">&nbsp;</td>     </tr>     <tr valign="middle">      <td colspan="1" rowspan="1" align="left">phar.require_hash</td>      <td colspan="1" rowspan="1" align="left">&quot;1&quot;</td>      <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td>      <td class="empty">&nbsp;</td>     </tr>     <tr valign="middle">      <td colspan="1" rowspan="1" align="left">phar.extract_list</td>      <td colspan="1" rowspan="1" align="left">&quot;&quot;</td>      <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td>      <td colspan="1" rowspan="1" align="left">Available from phar 1.1.0 to 1.2.3, removed in 2.0.0.</td>     </tr>     <tr valign="middle">      <td colspan="1" rowspan="1" align="left">phar.cache_list</td>      <td colspan="1" rowspan="1" align="left">&quot;&quot;</td>      <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td>      <td colspan="1" rowspan="1" align="left">Available from phar 2.0.0.</td>     </tr>    </tbody>   </colgroup>  </table> </p>  <p class="para">Here&#039;s a short explanation ofthe configuration directives.</p>  <p class="para">  <dl>   <dt id="ini.phar.readonly">    <span class="term">     <i><tt class="parameter">phar.readonly</tt></i>     <a href="language.types.boolean.html" class="type boolean">boolean</a>    </span>    <dd>     <p class="para">      This option disables creation or modification of Phar archives      using the <i>phar</i> stream or <a href="class.Phar.html" class="classname">Phar</a>      object&#039;s write support.  This setting should always be enabled on      production machines, as the phar extension&#039;s convenient write support      could allow straightforward creation of a php-based virus when coupled      with other common security vulnerabilities.     </p>     <blockquote><p><b class="note">Note</b>:              This setting can only be unset in php.ini due to security reasons.       If <i>phar.readonly</i> is disabled in php.ini, the       user may enable <i>phar.readonly</i> in a script       or disable it later.  If <i>phar.readonly</i> is       enabled in php.ini, a script may harmlessly &quot;re-enable&quot;       the INI variable, but may not disable it.      <br />     </p></blockquote>    </dd>   </dt>   <dt id="ini.phar.require-hash">    <span class="term">     <i><tt class="parameter">phar.require_hash</tt></i>     <a href="language.types.boolean.html" class="type boolean">boolean</a>    </span>    <dd>     <p class="para">      This option will force all opened Phar archives to contain some      kind of signature (currently MD5, SHA1, SHA256 and SHA512 are supported), and will      refuse to process any Phar archive that does not contain a signature.     </p>     <blockquote><p><b class="note">Note</b>:              This setting can only be unset in php.ini due to security reasons.       If <i>phar.require_hash</i> is disabled in php.ini, the       user may enable <i>phar.require_hash</i> in a script       or disable it later.  If <i>phar.require_hash</i> is       enabled in php.ini, a script may harmlessly &quot;re-enable&quot;       the INI variable, but may not disable it.      <br />     </p></blockquote>    </dd>   </dt>   <dt id="ini.phar.extract-list">    <span class="term">     <i><tt class="parameter">phar.extract_list</tt></i>     <a href="language.types.string.html" class="type string">string</a>    </span>    <dd>     <p class="para">      This INI setting has been removed as of phar 2.0.0     </p>     <p class="para">      Allows mappings from a full path to a phar archive or its alias to      the location of its extracted files.      The format of the parameter is <i>name=archive,name2=archive2</i>.      This allows extraction of phar files to disk, and allows phar to act as a      kind of mapper to extracted disk files.  This is often done for performance      reasons, or to assist with debugging a phar.      <div class="example">       <p><b>Example #1 phar.extract_list usage example</b></p>       <div class="example-contents"><div class="phpcode"><code><span style="color: #000000">in&nbsp;php.ini:<br />phar.extract_list&nbsp;=&nbsp;archive=/full/path/to/archive/,arch2=/full/path/to/arch2<br /><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">include&nbsp;</span><span style="color: #DD0000">"phar://archive/content.php"</span><span style="color: #007700">;<br />include&nbsp;</span><span style="color: #DD0000">"phar://arch2/foo.php"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>       </div>      </div>     </p>    </dd>   </dt>   <dt id="ini.phar.cache-list">    <span class="term">     <i><tt class="parameter">phar.cache_list</tt></i>     <a href="language.types.string.html" class="type string">string</a>    </span>    <dd>     <p class="para">      This INI setting was added in phar 2.0.0     </p>     <p class="para">      Allows mapping phar archives to be pre-parsed at web server startup,      providing a performance improvement that brings running files out of a      phar archive very close to the speed of running those files from a      traditional disk-based installation.      <div class="example">       <p><b>Example #2 phar.cache_list usage example</b></p>       <div class="example-contents"><div class="phpcode"><code><span style="color: #000000">in&nbsp;php.ini&nbsp;(windows):<br />phar.cache_list&nbsp;=C:\path\to\phar1.phar;C:\path\to\phar2.phar<br />in&nbsp;php.ini&nbsp;(unix):<br />phar.cache_list&nbsp;=/path/to/phar1.phar:/path/to/phar2.phar</span></code></div>       </div>      </div>     </p>    </dd>   </dt>  </dl> </p></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="phar.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.resources.html">Resource Types</a></div> <div class="up"><a href="phar.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 + -
显示快捷键?