note 99292 added to features.file-upload.errors
| From: | Tom at osu1 dot php dot net | Date: | Mon, 09 Aug 2010 10:06:22 +0000 |
| Subject: | note 99292 added to features.file-upload.errors | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171480@lists.php.net to get a copy of this message | ||
Note: something that might surprise you, PHP also provides a value in the $_FILES array, if the
input element has no value at all, stating an error UPLOAD_ERR_NO_FILE.
So UPLOAD_ERR_NO_FILE is not an error, but a note that the input element just had no value. Thus you
can't rely on the $_FILES array to see if a file was provided. Instead you have to walk the
array and check every single damn entry - which can be quite difficult since the values may be
nested if you use input elements named like "foo[bar][bla]".
Seems like PHP just introduced you to yet another common pitfall.
----
Server IP: 85.214.154.209
Probable Submitter: 91.35.130.180
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.errors.php
Edit -- https://master.php.net/note/edit/99292
Del: integrated -- https://master.php.net/note/delete/99292/integrated
Del: useless -- https://master.php.net/note/delete/99292/useless
Del: bad code -- https://master.php.net/note/delete/99292/bad+code
Del: spam -- https://master.php.net/note/delete/99292/spam
Del: non-english -- https://master.php.net/note/delete/99292/non-english
Del: in docs -- https://master.php.net/note/delete/99292/in+docs
Del: other reasons-- https://master.php.net/note/delete/99292
Reject -- https://master.php.net/note/reject/99292
Search -- https://master.php.net/manage/user-notes.php