#18881 [NEW]: $_FILES order is not logical
| From: | martijn at sheeponfire dot nl | Date: | Tue, 13 Aug 2002 13:33:32 +0000 |
| Subject: | #18881 [NEW]: $_FILES order is not logical | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-16609@lists.php.net to get a copy of this message | ||
From: martijn@sheeponfire.nl
Operating system: linux, windows
PHP version: 4.2.2
PHP Bug Type: Feature/Change Request
Bug description: $_FILES order is not logical
when you submit files with a form like this:
<form method="post" enctype="multipart/form-data">
<input type="file" name="File[one][two][]"><br>
<input type="file" name="File[one][two][]"><br>
<input type="submit" value="go">
</form>
the superglobal $_FILES looks like this:
Array
(
[File] => Array
(
[name] => Array
(
[one] => Array
(
[two] => Array
(
[0] => empty.gif
[1] => header.gif
)
)
)
[type] => Array
(
[one] => Array
(
[two] => Array
(
[0] => image/gif
[1] => image/gif
)
)
)
[tmp_name] => Array
(
[one] => Array
(
[two] => Array
(
[0] => /tmp/phpuploads/php2ocF9K
[1] => /tmp/phpuploads/phpmUbo1l
)
)
)
[error] => Array
(
[one] => Array
(
[two] => Array
(
[0] => 0
[1] => 0
)
)
)
[size] => Array
(
[one] => Array
(
[two] => Array
(
[0] => 43
[1] => 5128
)
)
)
)
)
Personally I think this is not very logical, I would prefer something like
this:
Array
(
[File] => Array
(
[one] => Array
(
[two] => Array
(
[0] => Array
(
[name] => empty.gif
[type] => image/gif
[tmp_name] => /tmp/phpuploads/php2ocF9K
[error] => 0
[size] => 43
)
[1] => Array
(
[name] => header.gif
[type] => image/gif
[tmp_name] => /tmp/phpuploads/phpmUbo1l
[error] => 0
[size] => 5128
)
)
)
)
)
--
Edit bug report at http://bugs.php.net/?id=18881&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18881&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18881&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18881&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18881&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18881&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18881&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18881&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18881&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18881&r=globals