|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-05-05 19:42 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
-Type: Feature/Change Request
+Type: Bug
-Package: Feature/Change Request
+Package: *General Issues
[2018-05-05 19:42 UTC] requinix@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 10:00:01 2025 UTC |
Description: ------------ To wit: a multidimensional upload will appear in $_FILES, but not in $_POST. This seems vaguely reminiscent of #19848, but is not a dupe. Reproduce code: --------------- <html> <head> </head> <body> <form action="test.php" method="post" enctype="multipart/form-data"> <input type="file" name="label[new_pics][]" /><br /> <input type="file" name="label[new_pics][]" /><br /> <input type="file" name="label[new_pics][]" /><br /> <input type="submit" /> </form> </body> </html> ------------- <?php // test.php print_r($_REQUEST); print_r($_POST); print_r($_FILES); Expected result: ---------------- Array ( [label] => Array ( [new_pics] => Array ( [0] => background.jpg [1] => techno.png [2] => picture.gif ) ) ) Array ( [label] => Array ( [new_pics] => Array ( [0] => background.jpg [1] => techno.png [2] => picture.gif ) ) ) Array ( [label] => Array ( [name] => Array ( [new_pics] => Array ( [0] => background.jpg [1] => techno.png [2] => picture.gif ) ) [type] => Array ( [new_pics] => Array ( [0] => image/jpeg [1] => image/png [2] => image/gif ) ) [tmp_name] => Array ( [new_pics] => Array ( [0] => /tmp/php0RVfzf [1] => /tmp/phpSRTpTl [2] => /tmp/phpWt2oxs ) ) [error] => Array ( [new_pics] => Array ( [0] => 0 [1] => 0 [2] => 0 ) ) [size] => Array ( [new_pics] => Array ( [0] => 131470 [1] => 20827 [2] => 59648 ) ) ) ) Actual result: -------------- Array ( ) Array ( ) Array ( [label] => Array ( [name] => Array ( [new_pics] => Array ( [0] => background.jpg [1] => techno.png [2] => picture.gif ) ) [type] => Array ( [new_pics] => Array ( [0] => image/jpeg [1] => image/png [2] => image/gif ) ) [tmp_name] => Array ( [new_pics] => Array ( [0] => /tmp/php0RVfzf [1] => /tmp/phpSRTpTl [2] => /tmp/phpWt2oxs ) ) [error] => Array ( [new_pics] => Array ( [0] => 0 [1] => 0 [2] => 0 ) ) [size] => Array ( [new_pics] => Array ( [0] => 131470 [1] => 20827 [2] => 59648 ) ) ) )