note 18976 deleted from features.file-upload by hholzgra
| From: | hholzgra@php.net | Date: | Sun, 14 Apr 2002 22:23:12 +0000 |
| Subject: | note 18976 deleted from features.file-upload by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-29343@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.