ftp_chdir

It changes the current directory on a FTP server

Example

<?php

$fName = “/home/user/test.txt”;

$ftpId = ftp_connect(‘ftp.phpcodez.com’);

$login_result = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);

ftp_chdir($ftpId, ‘phpcodez’);

?>

Share