|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-11 16:29 UTC] destes at ix dot netcom dot com
[2003-08-11 16:34 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
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 ) ) ) ) )