array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.ftp-pwd.php', 1 => 'ftp_pwd', ), 'up' => array ( 0 => 'ref.ftp.php', 1 => 'FTP-Funktionen', ), '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' => 'de', 'path' => 'reference/ftp/functions/ftp-pwd.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
ftp_pwd — Liefert den aktuellen Verzeichnisnamen
Gibt den aktuellen Verzeichnisnamen zurück oder false
im Fehlerfall.
Version | Beschreibung |
---|---|
8.1.0 |
Der Parameter ftp erwartet nun eine
FTP\Connection-Instanz; vorher wurde eine Ressource
erwartet.
|
Beispiel #1 ftp_pwd()-Beispiel
<?php
// Verbindung aufbauen
$ftp = ftp_connect($ftp_server);
// Login mit Benutzername und Passwort
$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);
// Wechsle das Verzeichnis zu public_html
ftp_chdir($ftp, 'public_html');
// Gibt das aktuelle Verzeichnis aus
echo ftp_pwd($ftp); // /public_html
// Verbindung schließen
ftp_close($ftp);
?>