Hàm ftp_pwd () trả về thư mục làm việc hiện tại, tức là thư mục hiện tại.
Cú pháp
ftw_pwd(con)
Tham số
-
con - Kết nối FTP
Quay lại
Hàm ftp_pwd () trả về TRUE khi thành công hoặc FALSE khi thất bại.
Ví dụ
Sau đây là một ví dụ -
<?php
$ftp_server = "192.168.0.4";
$ftp_user = "tim";
$ftp_pass = "wthbn#@121";
$con = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
$login = ftp_login($con, $ftp_user, $ftp_pass);
// change the current directory
ftp_chdir($con, "demo");
// now the current directory is updated to demo
echo ftp_pwd($con);
// close
ftp_close($con);
?>