PHP ftp_pwd() Function
Definition and Usage
The ftp_pwd() function returns the current directory name.
Syntax
ftp_pwd(ftp_connection)
Parameters | Description |
---|---|
ftp_connection | Required. Specifies the FTP connection to use (the identifier for the FTP connection). |
Examples
<?php $conn = ftp_connect("ftp.testftp.com") or die("Could not connect"); ftp_login($conn,"admin","ert456"); // Output the current directory echo ftp_pwd($conn) . "<br />"; // Change directory to images ftp_chdir($conn,"images"); // Output the current directory echo ftp_pwd($conn); ftp_close($conn); ?>