Datei Upload per FTP will nicht gelingen!

Kidix

Grünschnabel
Hi,


ich habe hier ein Script, aber bekomme es zum verrecken nicht zum laufen.

Warning: ftp_put(): Unable to access kmitte.jpg in /srv/www/htdocs/web1/html/upload/sendimage.php on line 33
FTP upload has failed

Es handelt sich um dieses Script:

<?php

$ftp_server='ftp.server.de';//serverip
$conn_id = ftp_connect($ftp_server);


// login with username and password
$user="web1f1";
$passwd="passwort";
$login_result = ftp_login($conn_id, $user, $passwd);

// check connection
if ((!$conn_id) || (!$login_result)) {
echo "FTP connection has failed!";
echo "Attempted to connect to $ftp_server for user $ftp_user_name";
die;
} else {
echo "<br>Connected to $ftp_server, for user $user<br>";
}
//directorylike /www.velibaba.com/images
ftp_chdir($conn_id, "src");
//ftp_chdir($conn_id, "compimages");

//$destination_file=ftp_pwd($conn_id);

$destination_file="x.jpg";
echo ("<br>");
print $destination_file;

echo ("<br>");

// upload the file
$upload = ftp_put($conn_id, $_FILES['destination_file']['name'], $_FILES['source_file']['name'], FTP_BINARY);

// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}

// close the FTP stream
ftp_close($conn_id);
echo($_FILES['source_file']['name']);
?>


Das Problem ist, ich habe Register_Globals auf OFF stehen. Wird auch nicht auf On gemacht...Was kann ich tun?

Gruß

Kidix
 
Zurück