I seem be to be having alot of trouble with this program. I do not know how to pin point what i am doing wrong. It doesnt say if eiteher it cant read my file or cant find it.
This is what i am using as code
$file = 'home/hassan/public_html/members/hassan/index.html';
$remote_file = 'home/hassan/public_html/members/test.html';
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// upload a file
if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
echo "successfully uploaded $file\n";
} else {
echo "There was a problem while uploading $file\n";
}
// close the connection
ftp_close($conn_id);
what I want to do is upload the index.html file to another ftp in the mebers fodler and should be called test.html or it could have the same name. The only thing i get is "there was a problem while uploading....." I Dont knwo what i am doing wrong here. There is no further analysis of the problem. Is there a way to find a detailed description of the problem.