note 45784 deleted from features.file-upload.multiple by aidan
| From: | aidan@php.net | Date: | Sun, 19 Sep 2004 03:27:48 +0000 |
| Subject: | note 45784 deleted from features.file-upload.multiple by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76960@lists.php.net to get a copy of this message | ||
Note Submitter: d.hartmann at webfunktion.de
----
First Way:
<input type="file" name="uploadfile[]"/>
<input type="file" name="uploadfile[]"/>
Second Way:
<input type="file" name="uploadfile[0]"/>
<input type="file" name="uploadfile[1]"/>
In Upload.php:
for ($i=0;$i<2;$i++) {
if ($_FILES["uploadfile"]["tmp_name"][$i]) {
move_uploaded_file(
$_FILES["uploadfile"]["tmp_name"][$i],
$_FILES["uploadfile"]["name"][$i]);
}}
Both works fine, if the client loads 2 Files.
Both works also fine, if the client loads only the first file.
But there no way to use move_uploaded_file, if the client likes only to load the second one.