Hier ist mal das ganze Skript. Das Verzeichnis pics existiert mit allen Rechten chmod (777).
Die Ausgabe ist unter: www.kraemer-elektronik.com/test.php
Vielleicht hilft das weiter. Das komische ist, das ich das schonmal gemacht habe und da funktioniert das ohne Probleme.
<html>
<body>
<form action="test.php" method="post" enctype="multipart/form-data">
<input type="file" name="bild1" accept="image/*">
<input type="submit" value="Test">
</form>
<?php
include("conf.php");
$test = $HTTP_POST_VARS[bild1];
$test2 = str_replace("\", ":", $test);
$test1 = split(":", $test2);
$count = count($test1);
$name = $test1[$count-1];
$pfad1="./pics/$name";
echo "Name:$name<br>Pfad:$HTTP_POST_VARS[bild1]<br>";
$connection_id = ftp_connect("$ftp_server");
$login_result = ftp_login($connection_id,"$benutzername","$passwort");
# if (!is_dir("./pics"))
# {
# $dir=split("/", "./pics");
# $path="";
# $ret = true;
# for ($i=1;$i<count($dir);$i++)
# {
# $path.="/".$dir[$i];
# if(!@ftp_chdir($connection_id,$path)){
# @ftp_chdir($connection_id,"/");
# if(!@ftp_mkdir($connection_id,$path)){
# $ret=false;
# }
# }
# }
# }
if($login_result)echo "Verbindung hergestellt<br>";
echo "$pfad1<br>$bild1";
$asd1 = ftp_put($connection_id, $pfad1, $bild1, FTP_BINARY);
echo "$asd1";
ftp_quit($connection_id);
?>
</body>
</html>