Hello,
I need some help with the PHP's FTP upload function.
I get this error:
Warning: ftp_put(): html/planet/uploaded.jpg: No such file or directory in /home/virtual/site9/fst/var/www/html/planet/admin/ftptest.php on line 32
And here is my related code, I know I am doing something wrong but I am not sure what. Any help would be appreciated.
Here's the related code:
$destination_file = "../../var/www/html/planet/uploaded.jpg";
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed! File not uploaded: $source_file";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}
// close the FTP stream
ftp_close($conn_id);
}
Line 32 starts with the $upload variable.
Thanks again in advanced.