<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/wrappers.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'wrappers.ftp.php',
    1 => 'ftp://',
    2 => 'FTP(s) URL へのアクセス',
  ),
  'up' => 
  array (
    0 => 'wrappers.php',
    1 => 'サポートするプロトコル/ラッパー',
  ),
  'prev' => 
  array (
    0 => 'wrappers.http.php',
    1 => 'http://',
  ),
  'next' => 
  array (
    0 => 'wrappers.php.php',
    1 => 'php://',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'language/wrappers/ftp.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="wrappers.ftp" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ftp://</h1>
  <h1 class="refname">ftps://</h1>
  <p class="refpurpose"><span class="refname">ftp://</span> -- <span class="refname">ftps://</span> &mdash; <span class="dc-title">FTP(s) URL へのアクセス</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-wrappers.ftp-description">
  <h3 class="title">説明</h3>
  <p class="para">
   FTP 経由でのファイルの読み込みと新しいファイルの作成を許可します。
   サーバーがパッシブモードの FTP をサポートしていない場合、接続は失敗します。
  </p>
  <p class="simpara">
   読み込み用または書き込み用のどちらかでファイルをオープンすることが
   可能ですが、それらを両方同時に指定することはできません。FTP サーバー上の
   既存のファイルを書き込み用にオープンしようとした場合、もし
   コンテキストオプション <code class="literal">overwrite</code> が指定されていなければ
   接続は失敗します。既存のファイルを FTP 越しに上書きしたい場合は、
   コンテキストオプション <code class="literal">overwrite</code> を指定したうえで
   書き込み用にファイルをオープンします。別の方法としては、
   <a href="ref.ftp.php" class="link">FTP 拡張モジュール</a> を使用することも可能です。
  </p>
  <p class="simpara">
   <a href="filesystem.configuration.php#ini.from" class="link">from</a> ディレクティブを
   <var class="filename">php.ini</var> で設定した場合、この値が
   anonymous FTP のパスワードとして送信されます。
  </p>
 </div>


 <div class="refsect1 usage" id="refsect1-wrappers.ftp-usage"> 
  <h3 class="title">利用法</h3>
  <ul class="itemizedlist">
   <li class="listitem"><span class="simpara"><var class="filename">ftp://example.com/pub/file.txt</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">ftp://user:password@example.com/pub/file.txt</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">ftps://example.com/pub/file.txt</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">ftps://user:password@example.com/pub/file.txt</var></span></li>
  </ul>
 </div>
 

 <div class="refsect1 options" id="refsect1-wrappers.ftp-options">
  <h3 class="title">オプション</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>ラッパーの概要</strong></caption>
    
     <thead>
      <tr>
       <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>Yes</td>
      </tr>

      <tr>
       <td>読み込み許可</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>書き込み許可</td>
       <td>Yes（新規ファイル あるいは 既存のファイルで <code class="parameter">overwrite</code> を指定）</td>
      </tr>

      <tr>
       <td>追加許可</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>同時読み書き許可</td>
       <td>No</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.stat.php" class="function">stat()</a></span> のサポート</td>
       <td>
        <span class="function"><a href="function.filesize.php" class="function">filesize()</a></span>、<span class="function"><a href="function.filemtime.php" class="function">filemtime()</a></span>、
        <span class="function"><a href="function.filetype.php" class="function">filetype()</a></span>、<span class="function"><a href="function.file-exists.php" class="function">file_exists()</a></span>、
        <span class="function"><a href="function.is-file.php" class="function">is_file()</a></span>、<span class="function"><a href="function.is-dir.php" class="function">is_dir()</a></span> のみ。
       </td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.unlink.php" class="function">unlink()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.rename.php" class="function">rename()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.mkdir.php" class="function">mkdir()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td><span class="function"><a href="function.rmdir.php" class="function">rmdir()</a></span> のサポート</td>
       <td>Yes</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>
 

 <div class="refsect1 notes" id="refsect1-wrappers.ftp-notes">
  <h3 class="title">注意</h3>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    FTPS がサポートされるのは、<a href="book.openssl.php" class="link">openssl</a>
    拡張モジュールが有効な場合のみです。
   </p>
   <span class="simpara">
    もしサーバーが SSL をサポートして
    いなければ、通常の（暗号化されない）FTP を使用します。
   </span>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <strong>追記</strong><br />
   <span class="simpara">
    <code class="literal">ftp://</code> URL ラッパー経由での
    ファイルの追記が可能です。
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-wrappers.ftp-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li><a href="context.ftp.php" class="xref">FTP コンテキストオプション</a></li>
  </ul>
 </div>


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