Some question about upload multiple file
| From: | Rujira Achawanantakun | Date: | Tue, 16 Jan 2001 10:02:51 +0000 |
| Subject: | Some question about upload multiple file | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-44216@lists.php.net to get a copy of this message | ||
Dear Sir,
I try to upload multiple files as I see from Uploading multiple file manual like this...
Example 18-2. Uploading multiple forms
1
2 <form action="file-upload.html" method="post"
enctype="multipart/form-data">
3 Send these files:<br>
4 <input name="userfile[]" type="file"><br>
5 <input name="userfile[]" type="file"><br>
6 <input type="submit" value="Send files">
7 </form>
8
For instance, assume that the filenames /home/test/review.html and /home/test/xwp.out are submitted.
In this case, $userfile_name[0] would contain the value review.html, and $userfile_name[1] would
contain the value xwp.out. Similarly, would contain review.html's filesize, and so forth.
But this is wrong when I use it! when I print value of the variable $userfile_name[0] it have any
value and $userfile_size[1] is not any infomation about size...what it happen? I want to write
upload script which can upload multifile by use syntax like this
$HOMEDIR = "/tmp";
for ($i=0; $i<=5; $i++) {
copy($userfile_name[$i],$HOMEDIR,);
}
Sorry for my broken english,
Yours sincerely,
Rujira.
--------------------------------------------------------------------------------