The ftp_chdir() function is used to change the current directory to a specified directory on an FTP server.
bool ftp_chdir ( resource $ftp_stream , string $directory )
Changes the current directory to the specified one.
Parameter | Description |
---|---|
ftp_stream | The link identifier of the FTP connection |
directory | The target directory |
Returns TRUE on success or FALSE on failure. If changing directory fails, PHP will also throw a warning.