PHP ftp_chdir() Function
Complete PHP FTP Reference Manual
Definition and Usage
The ftp_chdir() function changes the current directory on the FTP server to a specified directory.
Returns TRUE on success, or FALSE with a warning on failure.
Syntax
ftp_chdir(ftp_connection,directory)
| Parameters | Description |
|---|---|
| ftp_connection | Required. Specifies the FTP connection to use. |
| directory | Required. Specifies the directory to change to. |
Example
"; //Change to the images directory ftp_chdir($conn,"images"); echo "Dir: ".ftp_pwd($conn); ftp_close($ftp_server); ?>The code above will output:
Dir: /
Dir: /images
Complete PHP FTP Reference Manual