<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.ftp-pwd.php',
    1 => 'ftp_pwd',
    2 => 'Devuelve el nombre del directorio actual',
  ),
  'up' => 
  array (
    0 => 'ref.ftp.php',
    1 => 'Funciones de FTP',
  ),
  'prev' => 
  array (
    0 => 'function.ftp-put.php',
    1 => 'ftp_put',
  ),
  'next' => 
  array (
    0 => 'function.ftp-quit.php',
    1 => 'ftp_quit',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/ftp/functions/ftp-pwd.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ftp-pwd" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ftp_pwd</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ftp_pwd</span> &mdash; <span class="dc-title">Devuelve el nombre del directorio actual</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.ftp-pwd-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ftp_pwd</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="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.ftp-pwd-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">ftp</code></dt>
     <dd>
      <p class="para">Una instancia de <span class="classname"><a href="class.ftp-connection.php" class="classname">FTP\Connection</a></span>.</p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.ftp-pwd-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Devuelve el nombre del directorio actual o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> en caso de error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.ftp-pwd-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  El parámetro <code class="parameter">ftp</code> ahora espera una instancia de
  <span class="classname"><a href="class.ftp-connection.php" class="classname">FTP\Connection</a></span> ; anteriormente, se esperaba un <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.ftp-pwd-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo con <span class="function"><strong>ftp_pwd()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// Establecimiento de una conexión básica<br /></span><span style="color: #0000BB">$ftp </span><span style="color: #007700">= </span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$ftp_server</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Identificación con un nombre de usuario y una contraseña<br /></span><span style="color: #0000BB">$login_result </span><span style="color: #007700">= </span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">$ftp</span><span style="color: #007700">, </span><span style="color: #0000BB">$ftp_user_name</span><span style="color: #007700">, </span><span style="color: #0000BB">$ftp_user_pass</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Cambia el directorio a public_html<br /></span><span style="color: #0000BB">ftp_chdir</span><span style="color: #007700">(</span><span style="color: #0000BB">$ftp</span><span style="color: #007700">, </span><span style="color: #DD0000">'public_html'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Muestra el directorio actual<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">ftp_pwd</span><span style="color: #007700">(</span><span style="color: #0000BB">$ftp</span><span style="color: #007700">); </span><span style="color: #FF8000">// /public_html<br /><br />// Cierre de la conexión<br /></span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$ftp</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-pwd-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ftp-chdir.php" class="function" rel="rdfs-seeAlso">ftp_chdir()</a> - Modifica el directorio FTP actual</span></li>
    <li><span class="function"><a href="function.ftp-cdup.php" class="function" rel="rdfs-seeAlso">ftp_cdup()</a> - Cambia de directorio y pasa al directorio padre</span></li>
   </ul>
  </p>
 </div>

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