#47553 [Opn->Bgs]: Problem with multi-dimensional $_FILES
| From: | jani@php.net | Date: | Thu, 05 Mar 2009 13:04:00 +0000 |
| Subject: | #47553 [Opn->Bgs]: Problem with multi-dimensional $_FILES | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134429@lists.php.net to get a copy of this message | ||
ID: 47553
Updated by: jani@php.net
Reported By: david at olyeo dot co dot uk
-Status: Open
+Status: Bogus
-Bug Type: Streams related
+Bug Type: *General Issues
Operating System: Ubuntu 8.04
PHP Version: 5.2CVS-2009-03-03 (snap)
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2009-03-03 18:43:07] david at olyeo dot co dot uk
Description:
------------
Hi,
I am just working with multi-dimensional file uploads and they are not
coming out as expected, i.e. they are not coming out the same as a
single file upload. I don't see why this should be - why not just output
all file upload in the same way?
Reproduce code:
---------------
I am using a form that has these fields:
<input type="file" name="submission[screenshot]" />
<input type="file" name="other[dem][][img][]" />
I am deliberately using multiple-depths as I am building an automatic
form handler that will be able to handle any form.
Expected result:
----------------
'submission' => array
(
'screenshot' => array
'name' => 'monster_wallpaper.jpg'
'type' => 'image/jpeg'
'tmp_name' => '/tmp/php48lX2Y'
'error' => 0
'size' => 223262
),
'other' => array
(
'dem' => array
(
'0' => array
(
'img' => array
(
'0' => 'mood_wallpaper.png'
'type' => 'image/png'
'tmp_name' => '/tmp/phpLotX1Q'
'error' => 0
'size' => 27809
),
),
),
)
Actual result:
--------------
array(
'submission' => array
(
'name' => array
(
'screenshot' => 'monster_wallpaper.jpg'
),
'type' => array
(
'screenshot' => 'image/jpeg'
),
'tmp_name' => array
(
'screenshot' => '/tmp/php48lX2Y'
),
'error' => array
(
'screenshot' => 0
),
'size' => array
(
'screenshot' => 223262
),
),
'other' => array
(
'name' => array
(
'dem' => array
(
'0' => array
(
'img' => array
(
'0' =>
'mood_wallpaper.png'
),
),
),
),
'type' => array
(
'dem' => array
(
'0' => array
(
'img' => array
(
'0' => 'image/png'
),
),
),
),
'tmp_name' => array
(
'dem' => array
(
'0' => array
(
'img' => array
(
'0' => '/tmp/phpLotX1Q'
),
),
),
),
'error' => array
(
'dem' => array
(
'0' => array
(
'img' => array
(
'0' => 0
),
),
),
),
'size' => array
(
'dem' => array
(
'0' => array
(
'img' => array
(
'0' => 27809
),
),
),
),
),
);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47553&edit=1