multi file upload in php4
| From: | Jeff Kolber | Date: | Mon, 05 Jun 2000 17:38:35 +0000 |
| Subject: | multi file upload in php4 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1068@lists.php.net to get a copy of this message | ||
Hello,
(I know that this is a oft-repeated subject, but the annotated manuals are
offline for the time being and the php3 docs don't seem to be correct)
has anyone noticed that php4 seems to handle multiple file uploads
differently than is documented?
I am trying to upload multiple files using the userfile[] array and am
noticing that:
1) userfile does not appear as part of HTTP_POST_VARS array
2)userfile_name, userfile_size and userfile_type arrays do not exist after
uploading , and the contents of userfile[] seem to go something like this:
for the file foo.gif :
userfile[0] = foo.gif - (seems ok - this is the name of the file)
userfile[1] = image/gif - (seems to be the file type)
userfile[2] = /tmp/php1Nrzxb - (seems to be the location of the temp file)
for multiple files this pattern continues - userfile[3] , [4], and [5] would
be the name, type and temp location of the second file in the array. This
is inconsistent with the documentation.
Is this the way php4 handles the uploads? and is there a way to get the
filesize of the uploaded file?
FWIW: server is php4 compiled on Linux, using netscape 4.7 client from a
macintosh
(since I am subscribed to digest I would appreciate replies directly to me -
thanks!!)
Jeff Kolber Director of Production
IN2 | 205 Hudson Street, 7th Floor, New York, NY 10013
jeff@in2.com | Phone 646-613-2007 | Fax 646-613-0648