ich habe ein Problem mit meinem selbstgeschriebenen Uploadscript. Und zwar wird die Datei anscheinend einfach nicht hochgeladen [$_FILES bleibt immer leer]...
Das "print_r($_FILES);" in Zeile 10 gibt einfach immer array( ); zurück...
htm:
<form action="admin.php?foto-newFile" method="POST" name="form1">
<table cellpadding="3" cellspacing="1" border="0" class="border">
<tr class="Chead">
<th colspan="2">Foto</th>
</tr>
<tr>
<td class="Cmite">Veranstaltung</td>
<td class="Cnorm">
<select name="id" size="5">
{ID}
</select>
</td>
</tr>
<tr>
<td class="Cmite">Foto</td>
<td class="Cnorm">
<input type="file" size="50" name="image" />
</td>
</tr>
<tr class="Cdark">
<td></td>
<td><input type="submit" value="Foto hochladen"></td>
</tr>
</table>
</form>
php:
if ( $menu->get(1) == 'newFile' ) {
$path = substr($_REQUEST['id'],0,6);
if (empty($path)) {
// nichts tun
} else {
// Foto in den entsprechenden Ordner hochladen
if (!empty($_FILES['image']['name'])) {
error_reporting(E_ALL);
$name = $_FILES['image']['tmp_name'];
print_r($_FILES);
$tmp = explode('.',$name);
$endung = $tmp[1];
$name = implode('',$tmp);
$path = 'include/images/multimedia/'.$path.'/';
$bild_id = getActualMaxId($path) + 1;
$bild_url = $path.$bild_id.'.'.$endung;
if (@move_uploaded_file ($_FILES['file']['tmp_name'][$k], $bild_url)) {
@chmod($bild_url, 0777);
// $msg .= 'Datei '.$name.'.'.$endung.' erfolgreich hochgeladen<br />';
$bild_thumb = $path.$id.'a.'.$endung;
$bild_norm = $path.$id.'.'.$endung;
create_thumb ($bild_url, $bild_thumb, $allgAr['gallery_preview_width']);
@chmod($bild_thumb, 0777);
create_thumb ($bild_url, $bild_norm , $allgAr['gallery_normal_width']);
@chmod($bild_norm, 0777);
} else {
// $msg .= 'Datei '.$name.'.'.$endung.' konnte nicht hochgeladen werden<br />';
}
} else {
// nichts zu tun
}
}
}
Hat jemand ne Idee? Ich bin mitlerweile echt ratlos... Suche schon seit Stunden meinen Fehler..
Zuletzt modifiziert von Domme_09 am 27.02.2010 - 21:50:48

