<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ftp.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.ftp-set-option.php',
    1 => 'ftp_set_option',
    2 => 'Imposta varie opzioni per l\'esecuzione di FTP',
  ),
  'up' => 
  array (
    0 => 'ref.ftp.php',
    1 => 'FTP Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.ftp-rmdir.php',
    1 => 'ftp_rmdir',
  ),
  'next' => 
  array (
    0 => 'function.ftp-site.php',
    1 => 'ftp_site',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/ftp/functions/ftp-set-option.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ftp-set-option" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">ftp_set_option</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ftp_set_option</span> &mdash; <span class="dc-title">Imposta varie opzioni per l&#039;esecuzione di FTP</span></p>

   </div>
   <div class="refsect1 unknown-1054" id="refsect1-function.ftp-set-option-unknown-1054">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>ftp_set_option</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$ftp_stream</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$option</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

    <p class="para rdfs-comment">
     Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> se e&#039;stato possibile impostare l&#039;opzione; <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> altrimenti.
     Se l&#039;opzione <code class="parameter">option</code> non e&#039;
     supportata o il valore <code class="parameter">value</code> del parametro passato alla funzione non corrisponde
     al valore atteso per l&#039;opzione <code class="parameter">option</code> scelta, viene generato un messaggio di errore.
    </p>
    <p class="para">
     Questa funzione controlla varie opzioni che hanno effetto durante
     l&#039;esecuzione dello stream FTP specificato. Il parametro <code class="parameter">value</code> dipende da quale
     parametro <code class="parameter">option</code> viene scelto per essere modificato.
     Attualmente sono riconosciute le seguenti opzioni:
     <table class="doctable table">
      <caption><strong>Opzioni supportate per l&#039;esecuzione di FTP</strong></caption>
      
       <tbody class="tbody">
        <tr>
         <td>FTP_TIMEOUT_SEC</td>
         <td>Modifica il timeout in secondi utilizzata per tutte le funzioni
         di rete. Il parametro <code class="parameter">value</code> deve essere un intero maggiore di 0. 
         Il timeout predefinito e&#039; di 90 secondi.</td>
        </tr>

        <tr>
         <td>FTP_AUTOSEEK</td>
         <td>Quando attivata, richieste GET or PUT con un parametro
         <code class="parameter">resumepos</code> o <code class="parameter">startpos</code>
         iniziano la ricerca dalla posizione richiesta all&#039;interno del file. This is enabled
         Questa opzione e&#039; attivata di default.
         </td>
        </tr>

       </tbody>
      
     </table>

    </p>
    <p class="para">
     <div class="example" id="example-1">
      <p><strong>Example #1 Esempio di funzione <span class="function"><strong>ftp_set_option()</strong></span></strong></p>
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Imposta il timeout di rete a 10 secondi<br /></span><span style="color: #0000BB">ftp_set_option</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn_id</span><span style="color: #007700">, </span><span style="color: #0000BB">FTP_TIMEOUT_SEC</span><span style="color: #007700">, </span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </div>
    </p>
    <p class="para">
     Vedere anche <span class="function"><a href="function.ftp-get-option.php" class="function">ftp_get_option()</a></span>.
    </p>
   </div>

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