note 25319 added to features.file-upload
| From: | martellare at hotmail dot com | Date: | Thu, 19 Sep 2002 15:13:47 +0000 |
| Subject: | note 25319 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36958@lists.php.net to get a copy of this message | ||
Just to note... I've found that it is very import where you place your <INPUT
type="hidden" name="MAX_FILE_SIZE"> tag in your <FORM>. It must be
before your <INPUT type="file">, or else it won't be accepted. I found that
this would affect code danCabral@lycos.com's (above). The following form...
<form ENCTYPE="multipart/form-data" method="POST">
<input TYPE="FILE" NAME="userfile">
<input type="hidden" name="MAX_FILE_SIZE" value="1">
<input type="submit">
</form>
... Will accept ANY file up to the the MAX_FILE_SIZE directive in php.ini. If you move things
around like this
<form ENCTYPE="multipart/form-data" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="1">
<input TYPE="FILE" NAME="userfile">
<input type="submit">
</form>
...it will then restrict files to <= 1 byte.
(I experienced this issue on IE 6.0 and Netscape 4.08, PHP 4.2.2, running Win XP)
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+25319
http://master.php.net/manage/user-notes.php?action=delete+25319
http://master.php.net/manage/user-notes.php?action=reject+25319