|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-29 13:58 UTC] bjori@php.net
[2006-03-29 15:30 UTC] olaf at 7val dot com
[2006-03-29 15:48 UTC] mgf@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 23:00:01 2025 UTC |
Description: ------------ When using input elements with names like "file[a][b][c]" the $_FILES Array is broken. With more than one input element it get even worse! Reproduce code: --------------- <html><head> <title>Test</title> </head> <body> <pre> <?PHP print_r($_FILES); ?> </pre> <form name="form1" enctype="multipart/form-data" method="post" ><input name="file[a][b][c]" size="25" accept="*/*" type="file"> <input type="submit" value="OK" name="submit"> </form> </body> </html> Expected result: ---------------- Array ( [file] => Array ( [a] => Array ( [b] => Array ( [c] => Array ( [name] => dsc00051.jpg [type] => image/jpeg [tmp_name] => /tmp/phpL3mhkD [error] => 0 [size] => 56484 ) ) ) ) ) Actual result: -------------- Array ( [file] => Array ( [name] => Array ( [a] => Array ( [b] => Array ( [c] => dsc00051.jpg ) ) ) [type] => Array ( [a] => Array ( [b] => Array ( [c] => image/jpeg ) ) ) [tmp_name] => Array ( [a] => Array ( [b] => Array ( [c] => /tmp/php2W1O7R ) ) ) [error] => Array ( [a] => Array ( [b] => Array ( [c] => 0 ) ) ) [size] => Array ( [a] => Array ( [b] => Array ( [c] => 56484 ) ) ) ) )