<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/filesystem.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'filesystem.configuration.php',
    1 => '运行时配置',
    2 => '运行时配置',
  ),
  'up' => 
  array (
    0 => 'filesystem.setup.php',
    1 => '安装/配置',
  ),
  'prev' => 
  array (
    0 => 'filesystem.setup.php',
    1 => '安装/配置',
  ),
  'next' => 
  array (
    0 => 'filesystem.resources.php',
    1 => '资源类型',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/filesystem/ini.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="filesystem.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>文件系统和流配置选项</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="filesystem.configuration.php#ini.allow-url-fopen" class="link">allow_url_fopen</a></td>
      <td>&quot;1&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="filesystem.configuration.php#ini.allow-url-include" class="link">allow_url_include</a></td>
      <td>&quot;0&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 7.4.0 起弃用。</td>
     </tr>

     <tr>
      <td><a href="filesystem.configuration.php#ini.user-agent" class="link">user_agent</a></td>
      <td>NULL</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="filesystem.configuration.php#ini.default-socket-timeout" class="link">default_socket_timeout</a></td>
      <td>&quot;60&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
    </tr>

     <tr>
      <td><a href="filesystem.configuration.php#ini.from" class="link">from</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="filesystem.configuration.php#ini.auto-detect-line-endings" class="link">auto_detect_line_endings</a></td>
      <td>&quot;0&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.1.0 起弃用。</td>
     </tr>

     <tr>
      <td><a href="filesystem.configuration.php#ini.sys-temp-dir" class="link">sys_temp_dir</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

    </tbody>
   
  </table>

 </p>

 <p class="simpara">这是配置指令的简短说明。</p>

 <p class="para">
  <dl>
   
    <dt id="ini.allow-url-fopen">
     <code class="parameter">allow_url_fopen</code>
     <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
    </dt>
    <dd>
     <p class="para">
      此选项启用可感知 URL 的 fopen 封装协议，从而可以像访问文件一样访问 URL
      对象。默认封装协议支持通过 ftp 或 http 协议访问
      <a href="features.remote-files.php" class="link">远程文件</a>，某些扩展（例如
      <a href="ref.zlib.php" class="link">zlib</a>）可能会注册其他封装协议。
     </p>
    </dd>
   

   
    <dt id="ini.allow-url-include">
     <code class="parameter">allow_url_include</code>
     <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
    </dt>
    <dd>
     <p class="para">
      此选项允许以下函数使用可感知 URL 的 fopen 封装协议：
      <span class="function"><a href="function.include.php" class="function">include</a></span>、<span class="function"><a href="function.include-once.php" class="function">include_once</a></span>、
      <span class="function"><a href="function.require.php" class="function">require</a></span>、<span class="function"><a href="function.require-once.php" class="function">require_once</a></span>。
     </p>
     <blockquote class="note"><p><strong class="note">注意</strong>: 
      <p class="para">
       此设置要求启用 allow_url_fopen。
      </p>
     </p></blockquote>
    </dd>
   

   
    <dt id="ini.user-agent">
     <code class="parameter">user_agent</code>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
    </dt>
    <dd>
     <p class="para">
      定义 PHP 发送的 User-Agent。
     </p>
    </dd>
   

   
    <dt id="ini.default-socket-timeout">
     <code class="parameter">default_socket_timeout</code>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
    </dt>
    <dd>
     <p class="para">
      基于 socket 的流的默认超时时间（秒）。指定负值表示永不超时。
     </p>
    </dd>
   

   
    <dt id="ini.from">
     <code class="parameter">from</code>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
    </dt>
    <dd>
     <p class="para">
      使用 ftp 和 http 封装协议时，此电子邮件地址分别用于未经身份验证的 FTP
      连接，以及 HTTP 连接的 From 标头值。
     </p>
    </dd>
   

   
    <dt id="ini.auto-detect-line-endings">
     <code class="parameter">auto_detect_line_endings</code>
     <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
    </dt>
    <dd>
     <p class="simpara">
      启用后，PHP 会检查 <span class="function"><a href="function.fgets.php" class="function">fgets()</a></span> 和
      <span class="function"><a href="function.file.php" class="function">file()</a></span> 读取的数据，判断其使用 Unix、MS-DOS
      还是 Macintosh 的行结束符约定。
     </p>
     <p class="simpara">这使 PHP 能够与 Macintosh 系统互操作，但默认值为 Off，
      因为检测第一行的 EOL 约定会产生很小的性能开销；此外，在 Unix
      系统上使用回车符作为项目分隔符的用户会遇到不向后兼容的行为。
     </p>
     <div class="warning"><strong class="warning">警告</strong>
      <p class="simpara">
       此选项自 PHP 8.1.0 起弃用。
      </p>
     </div>
    </dd>
   

   
    <dt id="ini.sys-temp-dir">
     <code class="parameter">sys_temp_dir</code>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
    </dt>
    <dd>
     <p class="para">
     </p>
    </dd>
   

  </dl>
 </p>
</div><?php manual_footer($setup); ?>