ID: 48077 Updated by: [email protected] Reported By: jose dot nobile at gmail dot com -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: Win XP+Apache 2.2.11+PHP 5.2.9-2 PHP Version: 5.2.9 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-04-25 16:32:16] jose dot nobile at gmail dot com Description: ------------ At POST request with multidimensional form vars, $_FILES are not "correctly" assign, the $_FILES is not "easy" to handle with actual multidimensional assign, it is not consistent. Reproduce code: --------------- <?PHP if($_SERVER['REQUEST_METHOD'] == 'POST'){ print_r($_FILES); } ?> <form name="form" action="" enctype="multipart/form-data" method="POST"> <input type="file" name="file[]" /><br /> <input type="file" name="foto[]" /><br /> <input type="file" name="foto[]" /><br /> <input type="file" name="foto[]" /><br /> <input type="file" name="foto[]" /><br /> <input type="submit" value="Submit" /> </form> Expected result: ---------------- Array ( [file] => Array ( [0] => Array ( [name] => foto internet workstation.JPG [type] => image/jpeg [tmp_name] => C:\wamp\tmp\php171.tmp [error] => 0 [size] => 99115 ) [1] => Array ( [name] => gfs 0.JPG [type] => image/jpeg [tmp_name] => C:\wamp\tmp\php172.tmp [error] => 0 [size] => 26263 ) [2] => Array ( [name] => hoja membretiada.jpg [type] => image/jpeg [tmp_name] => C:\wamp\tmp\php173.tmp [error] => 0 [size] => 245987 ) [3] => Array ( [name] => img005CEDULA ADMINISTRATIVA.jpg [type] => image/jpeg [tmp_name] => C:\wamp\tmp\php174.tmp [error] => 0 [size] => 283589 ) [4] => Array ( [name] => kathe 3 copy.jpg [type] => image/jpeg [tmp_name] => C:\wamp\tmp\php175.tmp [error] => 0 [size] => 122558 ) ) ) Actual result: -------------- Array ( [file] => Array ( [name] => Array ( [0] => foto internet workstation.JPG ) [type] => Array ( [0] => image/jpeg ) [tmp_name] => Array ( [0] => C:\wamp\tmp\php15C.tmp ) [error] => Array ( [0] => 0 ) [size] => Array ( [0] => 99115 ) ) [foto] => Array ( [name] => Array ( [0] => gfs 0.JPG [1] => hoja membretiada.jpg [2] => img005CEDULA ADMINISTRATIVA.jpg [3] => kathe 3 copy.jpg ) [type] => Array ( [0] => image/jpeg [1] => image/jpeg [2] => image/jpeg [3] => image/jpeg ) [tmp_name] => Array ( [0] => C:\wamp\tmp\php15D.tmp [1] => C:\wamp\tmp\php15E.tmp [2] => C:\wamp\tmp\php15F.tmp [3] => C:\wamp\tmp\php160.tmp ) [error] => Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 ) [size] => Array ( [0] => 26263 [1] => 245987 [2] => 283589 [3] => 122558 ) ) ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48077&edit=1
