note 116450 added to features.file-upload.errors
| From: | Tom | Date: | Mon, 05 Jan 2015 15:29:54 +0000 |
| Subject: | note 116450 added to features.file-upload.errors | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201364@lists.php.net to get a copy of this message | ||
As it is common to use move_uploaded_file with file uploads, how to get it's error messages
should be noted here (especially since it's not noted anywhere else in the manual).
Common code is to do something like:
if (move_uploaded_file($_FILES["file1"]["tmp_name"], $target_file)) {
echo "<P>FILE UPLOADED TO: $target_file</P>";
} else {
echo "<P>MOVE UPLOADED FILE FAILED!!</P>";
print_r(error_get_last());
}
----
Server IP: 72.52.91.14
Probable Submitter: 128.172.48.1
----
Manual Page -- http://php.net/manual/en/features.file-upload.errors.php
Edit -- https://master.php.net/note/edit/116450
Del: integrated -- https://master.php.net/note/delete/116450/integrated
Del: useless -- https://master.php.net/note/delete/116450/useless
Del: bad code -- https://master.php.net/note/delete/116450/bad+code
Del: spam -- https://master.php.net/note/delete/116450/spam
Del: non-english -- https://master.php.net/note/delete/116450/non-english
Del: in docs -- https://master.php.net/note/delete/116450/in+docs
Del: other reasons-- https://master.php.net/note/delete/116450
Reject -- https://master.php.net/note/reject/116450
Search -- https://master.php.net/manage/user-notes.php