array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'function.ftp-pwd.php', 1 => 'ftp_pwd', 2 => 'Returns the current directory name', ), 'up' => array ( 0 => 'ref.ftp.php', 1 => 'Функції 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' => 'en', '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); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
ftp_pwd — Returns the current directory name
Returns the current directory name or false
on error.
Версія | Опис |
---|---|
8.1.0 |
Тепер параметр ftp має бути примірником
FTP\Connection. Раніше очікувався resource.
|
Приклад #1 ftp_pwd() example
<?php
// set up basic connection
$ftp = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);
// change directory to public_html
ftp_chdir($ftp, 'public_html');
// print current directory
echo ftp_pwd($ftp); // /public_html
// close the connection
ftp_close($ftp);
?>