Nieuw lid |
|
oke fijn maar moet ik verder nog iets invullen of veranderen in dit script?
<?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { require_once 'class/fileupload.class.php'; $oFile = new FileUpload($_FILES['bestand']); $oFile->addFileType('gif', 'image/gif'); $oFile->addFileType('jpg', array('image/jpeg', 'image/pjpeg')); $oFile->addFileType('jpeg', array('image/jpeg', 'image/pjpeg')); $oFile->addFileType('png', 'image/png'); $oFile->addFileType('rar', 'application/x-download'); $oFile->moveFiles('uploads'); echo '<pre>'.var_export($oFile->getErrors(), true).'</pre>'; echo '<pre>'.var_export($oFile->getUploaded(), true).'</pre>'; } ?> <form method="post" action="index.php" enctype="multipart/form-data"><input type="file" name="bestand" id="bestand" /><br /><input type="submit" name="upload" value="Uploaden!" /></form>
<?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { require_once 'class/fileupload.class.php'; $oFile = new FileUpload ($_FILES['bestand']); $oFile->addFileType('gif', 'image/gif'); $oFile->addFileType('jpg', array('image/jpeg', 'image/pjpeg')); $oFile->addFileType('jpeg', array('image/jpeg', 'image/pjpeg')); $oFile->addFileType('png', 'image/png'); $oFile->addFileType('rar', 'application/x-download'); $oFile->moveFiles('uploads'); echo '<pre>'.var_export($oFile->getErrors(), true).'</pre>'; echo '<pre>'.var_export($oFile->getUploaded(), true).'</pre>'; } ?> <form method="post" action="index.php" enctype="multipart/form-data"><input type="file" name="bestand" id="bestand" /><br /><input type="submit" name="upload" value="Uploaden!" /></form>
|