PHP file_upload
Posted by: Dizzley
Posted on: 2008-03-24 07:09:00
I can't get file upload working. Nothing in$_FILES after submit from this form:
<form action="loadgpx.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000" />
Type (or select) Filename: <input type="file" name="uploadFile">
<input type="submit" value="Upload File">
</form>
I guess that the file goes to my DOCUMENT_ROOT. But no file, no error, nothing. :(
here's a snippet of the processing code:
// POST has a file in uploadFile
//
if (isset($_POST['uploadFile'])) {
if ($_FILES["file"]["error"] > 0) {
echo "Error: " . $_FILES["file"]["error"] . "<br />";
} else {
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
Dizz.