note 7883 added to Uploading multiple files
| From: | pikachu at pobox dot com | Date: | Fri, 18 Aug 2000 09:00:00 +0000 |
| Subject: | note 7883 added to Uploading multiple files | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2458@lists.php.net to get a copy of this message | ||
It's really not worthwhile using arrays with uploading multiple files since the size is left
out. (am using PHP4)
I echo-ed all key/values on the HTTP_POST_FILES and only the tmp_name and size of the last file is
stored in there. Might as well use different names for different files as mentioned by jason earlier
in the list. (^_^)
This is what I got when I echo-ed the uploaded files using userfile[0][] and userfile[1][] for two
input type=file tags...
HTTP_POST_FILES[userfile][0][0][name] = mysqlpower.gif
HTTP_POST_FILES[userfile][0][1][type] = image/gif
HTTP_POST_FILES[userfile][tmp_name] = /var/tmp/phpQpk302
HTTP_POST_FILES[userfile][size] = 2060
HTTP_POST_FILES[userfile][1][0][name] = phplib_sm.gif
HTTP_POST_FILES[userfile][1][1][type] = image/gif
userfile[0][0] = mysqlpower.gif
userfile[0][1] = image/gif
userfile[0][2] = /var/tmp/phpFWA302
userfile[1][0] = phplib_sm.gif
userfile[1][1] = image/gif
userfile[1][2] = /var/tmp/phpQpk302
http://www.php.net/manual/feature-fileupload.multiple.php