<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'wrappers.ftp.php',
    1 => 'ftp://',
    2 => 'Accessing FTP(s) URLs',
  ),
  'up' => 
  array (
    0 => 'wrappers.php',
    1 => 'Supported Protocols and Wrappers',
  ),
  'prev' => 
  array (
    0 => 'wrappers.http.php',
    1 => 'http://',
  ),
  'next' => 
  array (
    0 => 'wrappers.php.php',
    1 => 'php://',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    '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">Accessing FTP(s) URLs</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-wrappers.ftp-description">
  <h3 class="title">Descrizione</h3>
  <p class="para">
   Allows read access to existing files and creation of new files
   via FTP.  If the server does not support passive mode ftp, the
   connection will fail.
  </p>
  <p class="simpara">
   You can open files for either reading or writing, but not both
   simultaneously.  If the remote file already exists on the ftp
   server and you attempt to open it for writing but have not specified
   the context option <code class="literal">overwrite</code>, the connection
   will fail.  If you need to overwrite existing files over ftp,
   specify the <code class="literal">overwrite</code> option in the context
   and open the file for writing.  Alternatively, you can
   use the <a href="ref.ftp.php" class="link">FTP extension</a>.
  </p>
  <p class="simpara">
   If you have set the <a href="filesystem.configuration.php#ini.from" class="link">from</a> directive
   in <var class="filename">php.ini</var>, then this value will be sent as the anonymous FTP
   password.
  </p>
 </div>


 <div class="refsect1 usage" id="refsect1-wrappers.ftp-usage"> 
  <h3 class="title">Utilizzo</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">Opzioni</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Wrapper Summary</strong></caption>
    
     <thead>
      <tr>
       <th>Attribute</th>
       <th>Supported</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>Restricted by <a href="filesystem.configuration.php#ini.allow-url-fopen" class="link">allow_url_fopen</a></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Reading</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Writing</td>
       <td>Yes (new files/existing files with <code class="parameter">overwrite</code>)</td>
      </tr>

      <tr>
       <td>Allows Appending</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Simultaneous Reading and Writing</td>
       <td>No</td>
      </tr>

      <tr>
       <td>Supports <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>, and <span class="function"><a href="function.is-dir.php" class="function">is_dir()</a></span>
        elements only.
       </td>
      </tr>

      <tr>
       <td>Supports <span class="function"><a href="function.unlink.php" class="function">unlink()</a></span></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports <span class="function"><a href="function.rename.php" class="function">rename()</a></span></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports <span class="function"><a href="function.mkdir.php" class="function">mkdir()</a></span></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports <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">Note</h3>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <p class="para">
    FTPS is only supported when the <a href="book.openssl.php" class="link">openssl</a>
    extension is enabled.
   </p>
   <span class="simpara">
    If the server does not support SSL, then the connection falls back
    to regular unencrypted ftp.
   </span>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <strong>Appending</strong><br />
   <span class="simpara">
    Files may be appended via the <code class="literal">ftp://</code> URL wrapper.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-wrappers.ftp-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><a href="context.ftp.php" class="xref">Opzioni di contesto FTP</a></li>
  </ul>
 </div>


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