note 32887 added to features.file-upload
| From: | ben at benmcmillan dot com | Date: | Tue, 10 Jun 2003 07:52:56 +0000 |
| Subject: | note 32887 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50074@lists.php.net to get a copy of this message | ||
After much debugging, I finally realized that the $userfile vars new versions of php creates for
convenience, arent convenient if you want to write a function to handle uploading. Those variables
that it creates arent global in scope like $_FILES (and $_REQUEST, etc) and thus cant be accessed
from inside functions (and uploading fails). Since the $_FILES array holds the same data, use it
instead. Hope this prevents headaches.
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32887
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32887&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32887&report=yes