Bug #1520: file upload arrays don't work/uploaded files not added to HTTP_POST_VARS
| From: | brian at schaffner dot net | Date: | Wed, 09 Jun 1999 19:18:07 +0000 |
| Subject: | Bug #1520: file upload arrays don't work/uploaded files not added to HTTP_POST_VARS | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6778@lists.php.net to get a copy of this message | ||
From: brian@schaffner.net
Operating system: Redhat Linux 5.2
PHP version: 3.0.7
PHP Bug Type: Parser error
Bug description: file upload arrays don't work/uploaded files not added to HTTP_POST_VARS
<form action="<? echo $PHP_SELF; ?>" method="post"
enctype="multipart/form-data">
<input type="file" name="thefile[]">
<input type="file" name="thefile[]">
<input type="submit">
</form>
<?
while (list($key, $val) = each($HTTP_POST_VARS)) {
echo "$key: $val<BR>\n";
}
?>
If you run this, you expect to get:
thefile: Array
There are 2 bugs at work here. The first is that ANY "FILE" doesn't get added to the
HTTP_POST_VARS array (although it should be). And, "FILE" arrays don't get defined at
all.
I imagine that this is not too difficult a bug to fix... maybe I'll muck around and see what I
can find...
-brian-