<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.ftp-set-option.php',
    1 => 'ftp_set_option',
    2 => 'Set miscellaneous runtime FTP options',
  ),
  'up' => 
  array (
    0 => 'ref.ftp.php',
    1 => 'Функції FTP',
  ),
  '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' => 'en',
    '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">Set miscellaneous runtime FTP options</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.ftp-set-option-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ftp_set_option</strong></span>(<span class="methodparam"><span class="type"><a href="class.ftp-connection.php" class="type FTP\Connection">FTP\Connection</a></span> <code class="parameter">$ftp</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"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></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">
   This function controls various runtime options for the specified FTP connection.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.ftp-set-option-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">ftp</code></dt>
     <dd>
       <p class="para">Примірник
<span class="classname"><a href="class.ftp-connection.php" class="classname">FTP\Connection</a></span>.</p>
     </dd>
    
    
     <dt><code class="parameter">option</code></dt>
     <dd>
      <p class="para">
       Currently, the following options are supported:
       <table class="doctable table">
        <caption><strong>Supported runtime FTP options</strong></caption>
        
         <tbody class="tbody">
          <tr>
           <td><strong><code><a href="ftp.constants.php#constant.ftp-timeout-sec">FTP_TIMEOUT_SEC</a></code></strong></td>
           <td>
            Changes the timeout in seconds used for all network related 
            functions. <code class="parameter">value</code> must be an integer that
            is greater than 0. The default timeout is 90 seconds.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="ftp.constants.php#constant.ftp-autoseek">FTP_AUTOSEEK</a></code></strong></td>
           <td>
            When enabled, GET or PUT requests with a 
            <code class="parameter">resumepos</code> or <code class="parameter">startpos</code>
            parameter will first seek to the requested position within the file.
            This is enabled by default.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="ftp.constants.php#constant.ftp-usepasvaddress">FTP_USEPASVADDRESS</a></code></strong></td>
           <td>
            When disabled, PHP will ignore the IP address returned by the FTP server in response to the PASV command and instead use the IP address that was supplied in the ftp_connect().
            <code class="parameter">value</code> must be a boolean.
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       This parameter depends on which <code class="parameter">option</code> is chosen
       to be altered.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.ftp-set-option-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the option could be set; <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if not. A warning
   message will be thrown if the <code class="parameter">option</code> is not
   supported or the passed <code class="parameter">value</code> doesn&#039;t match the
   expected value for the given <code class="parameter">option</code>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.ftp-set-option-changelog">
  <h3 class="title">Журнал змін</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версія</th>
      <th>Опис</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  Тепер параметр <code class="parameter">ftp</code> має бути примірником
  <span class="classname"><a href="class.ftp-connection.php" class="classname">FTP\Connection</a></span>. Раніше очікувався <a href="language.types.resource.php" class="link">resource</a>.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 examples" id="refsect1-function.ftp-set-option-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>ftp_set_option()</strong></span> example</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">// Set the network timeout to 10 seconds<br /></span><span style="color: #0000BB">ftp_set_option</span><span style="color: #007700">(</span><span style="color: #0000BB">$ftp</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>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.ftp-set-option-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ftp-get-option.php" class="function" rel="rdfs-seeAlso">ftp_get_option()</a> - Retrieves various runtime behaviours of the current FTP connection</span></li>
   </ul>
  </p>
 </div>

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