Das Problem ist, dass die Datei nicht kopiert wird, bzw. anscheinend gar nicht auf den Server geladen wird.
Das Zielverzeichnis und das temporäre Uploadverzeichnis ist 777.
Es hat zuvor auch funktioniert, doch musste ich ein paar Anpassungen machen.
Code: Alles auswählen
$log = "";
$cert1 = "image/pjpeg"; //Jpeg type 1
$cert2 = "image/jpeg"; //Jpeg type 2
$cert3 = "image/gif"; //Gif type
$cert4 = "image/ief"; //Ief type
$cert5 = "image/png"; //Png type
$cert6 = "image/tiff"; //Tiff type
$cert7 = "image/bmp"; //Bmp Type
$cert8 = "image/vnd.wap.wbmp"; //Wbmp type
$cert9 = "image/x-cmu-raster"; //Ras type
$cert10 = "image/x-x-portable-anymap"; //Pnm type
$cert11 = "image/x-portable-bitmap"; //Pbm type
$cert12 = "image/x-portable-graymap"; //Pgm type
$cert13 = "image/x-portable-pixmap"; //Ppm type
$cert14 = "image/x-rgb"; //Rgb type
$cert15 = "image/x-xbitmap"; //Xbm type
$cert16 = "image/x-xpixmap"; //Xpm type
$cert17 = "image/x-xwindowdump"; //Xwd type
$bildsize = "2500000";
$abpath = "/pfad/der/richtig/ist";
for ($i=0; $i<1; $i++) {
$dateiname = $img_name[$i];
$dateiname2 = time() . $dateiname;
$dateigroesse = $img_size[$i];
$dateityp = $img_type[$i];
$dateilink = $abpath . "/" . $dateiname2;
if ($dateiname == "") {
$log .= "Kein Bild zum Hochladen ausgew&hlt<br>";
$nichts = "nichts";
$dateigroesse = "0";
}
if ($dateiname != "") {
if (file_exists("$dateilink")) {
$log .= "Datei $dateiname existiert bereits auf unserem Server<br>";
$dateiname = "bildfehler";
$dateigroesse = "0";
}
else {
if ($dateigroesse > $bildsize) {
$log .= "Die Datei darf maximal 250kb gro& sein ($dateigroesse Bytes)<br>";
$dateiname = "bildfehler";
$dateigroesse = "0";
}
else {
if (($dateityp == $cert1) or ($dateityp == $cert2) or ($dateityp == $cert3) or ($dateityp == $cert4) or ($dateityp == $cert5) or ($dateityp == $cert6) or ($dateityp == $cert7) or ($dateityp == $cert8) or ($dateityp == $cert9) or ($dateityp == $cert10) or ($dateityp == $cert11) or ($dateityp == $cert12) or ($dateityp == $cert13) or ($dateityp == $cert14) or ($dateityp == $cert15) or ($dateityp == $cert16) or ($dateityp == $cert17)) {
@copy($dateiname, "$dateilink") or $log .= "Couldn't copy image 1 to server<br>";
}
else {
$log .= "Die gew&hlte Datei ($dateiname) ist kein zugelassenes Bild<br>";
$dateiname = "bildfehler";
$dateigroesse = "0";
}
if (file_exists("$dateilink")) {
$log .= "Bild $dateiname wurde gespeichert<br>";
}
else {
print ("Datei wurde nicht gespeichert");
}
}
}
}
}
Code: Alles auswählen
print ("Dateiname1: $dateiname Dateiname2: $dateiname2 Dateigroesse: $dateigroesse Nichts: $nichts Log: $log Dateityp2: $dateityp Pfad: $dateilink");
Ich habe nun leider schon einige Stunden erfolgslos nach dem Fehler gesuchtDatei wurde nicht gespeichertDateiname1: coolchaos.jpg Dateiname2: 1047171832coolchaos.jpg Dateigroesse: 16536 Nichts: Log: Couldn't copy image 1 to server
Dateityp2: image/pjpeg Pfad: /pfad/der/richtig/ist/1047171832coolchaos.jpg
