note 104395 added to reserved.variables.files
| From: | Sbastien at osu1 dot php dot net | Date: | Mon, 13 Jun 2011 14:36:52 +0000 |
| Subject: | note 104395 added to reserved.variables.files | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180484@lists.php.net to get a copy of this message | ||
If you're uploading multiple files and you name your file inputs "upload[]" the
$_FILES array will look different than the var_dump posted below. I figured I'd post what it
looks like since it caused me (and still causes me) headaches!
array(1) {
["upload"]=>array(5) {
["name"]=>array(3) {
[0]=>string(9)"file0.txt"
[1]=>string(9)"file1.txt"
[2]=>string(9)"file2.txt"
}
["type"]=>array(3) {
[0]=>string(10)"text/plain"
[1]=>string(10)"text/plain"
[2]=>string(10)"text/plain"
}
["tmp_name"]=>array(3) {
[0]=>string(14)"/tmp/blablabla"
[1]=>string(14)"/tmp/phpyzZxta"
[2]=>string(14)"/tmp/phpn3nopO"
}
["error"]=>array(3) {
[0]=>int(0)
[1]=>int(0)
[2]=>int(0)
}
["size"]=>array(3) {
[0]=>int(0)
[1]=>int(0)
[2]=>int(0)
}
}
}
(I thought the array would have looked like upload[index][name] which is not the case.)
----
Server IP: 69.147.83.197
Probable Submitter: 208.97.109.12
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.files.php
Edit -- https://master.php.net/note/edit/104395
Del: integrated -- https://master.php.net/note/delete/104395/integrated
Del: useless -- https://master.php.net/note/delete/104395/useless
Del: bad code -- https://master.php.net/note/delete/104395/bad+code
Del: spam -- https://master.php.net/note/delete/104395/spam
Del: non-english -- https://master.php.net/note/delete/104395/non-english
Del: in docs -- https://master.php.net/note/delete/104395/in+docs
Del: other reasons-- https://master.php.net/note/delete/104395
Reject -- https://master.php.net/note/reject/104395
Search -- https://master.php.net/manage/user-notes.php