Kód:
<?
if(!isset($_POST['upload'])) {
?>
<form ENCTYPE="multipart/formdata" name="upload" action="<?echo $_SERVER['PHP_SELF']?>" method="POST" >
<input type="hidden" name="MAX_FILE_SIZE" value="80000" />
Select the file to upload: <input type="file" name="userfile">
<input type="submit" name="upload" value="upload">
</form>
<?
}
else {
var_dump($HTTP_POST_FILES['userfile']);
require_once 'includes/upload.class.php';
$upload = new upload($_FILES['userfile']['tmp_name'], $_FILES['userfile']['name'], $_FILES['userfile']['size'], './uploads', 'image/jpeg');
echo $upload->getError();
}
?>
toto je moj script, ktory sa stara o zobrazenie form pre upload a taktiez o jeho spracovanie. Ale problem je ten, ze pole $_FILES ostava prazdne, neviem kde moze byt chyba