note 18976 added to features.file-upload
| From: | php-general at lists dot php dot net | Date: | Tue, 12 Feb 2002 11:42:50 +0000 |
| Subject: | note 18976 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26503@lists.php.net to get a copy of this message | ||
to avoid getting the 'file upload attack message' when you use the code above change
if (is_uploaded_file($HTTP_POST_FILES['userfile'])) {
to
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
petermah further up the tree mentioned this but worth mentioning again - [userfile] is an array
whereas is_uploaded_file is expecting a string filename - this is
['userfile']['tmp_name'].
same goes for the move_uploaded_file function.
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+18976
http://master.php.net/manage/user-notes.php?action=delete+18976
http://master.php.net/manage/user-notes.php?action=reject+18976