I’m using ftp_put() to download a file from another server. Everything (connection etc.) working but it wont download.
ftp_chdir($conn_id, $destination_file);
$upload = ftp_put($conn_id, $name, $source_file, FTP_BINARY);
above is my code and its giving error “Can’t change directory to”…
when i out ftp_put without ‘ftp_chdir’ it didn’t work so i used ftp_chdir. but still not working. $destination_file equal to a path and $name equal to a file. Please give me an idea what a i doing wrong?
p.s even $upload is returning true. But i can’t find the file anywhere.
Use
ftp_getnotftp_putftp_get from PHP manual