note 37116 added to features.file-upload
| From: | ashe at adomain dot com | Date: | Mon, 03 Nov 2003 19:56:18 +0000 |
| Subject: | note 37116 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-59735@lists.php.net to get a copy of this message | ||
I just spend so many time finding this error in my code I would like to share it:
call me newbie, but I just copied the form displayed in this documentation:
<form enctype="multipart/form-data" action="_URL_"
method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
and forgot about the MAX_FILE_SIZE var for ever more...
unless you give this var a bigger value, no file will update, if you make
var_dump($_FILES);
in the update.php file (_URL_), you'll find that $_FILE[userfile][name] has a value but
$_FILE[userfile][tmp_name] and [size] is empty.
you shoult check too your php.ini to make shure you allow file uploads...
cheers!
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37116
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37116&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37116&report=yes
Search -- http://master.php.net/manage/user-notes.php