In PHP I am using ftp to copy files. I am having trouble with the ftp_put() command. I keep on getting "/public_html/papa/v227: No such file or directory".
Here is the code I use
I have tried many variations of the destination file path.
The directory public_html/papa does exist with no access restrictions and the source file gives a positive "file exists".
I feel that there is something wrong with the way I specify the file path for ftp.
Here is the code I use
Code:
$source_file = "/home/joeschmoe/public_html/vbbu/v226";
$filename=$source_file;
if (file_exists($filename)) {
print "The file $filename exists";
} else {
print "The file $filename does not exist<br>";
}
$destination_file = "/public_html/papa/v227";
$download = ftp_put($conn_id, "$destination_file", "$source_file", FTP_BINARY);
The directory public_html/papa does exist with no access restrictions and the source file gives a positive "file exists".
I feel that there is something wrong with the way I specify the file path for ftp.