note 21011 deleted from features.file-upload by didou

From: Date: Mon, 23 Jun 2003 11:48:57 +0000
Subject: note 21011 deleted from features.file-upload by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-50860@lists.php.net to get a copy of this message
Note Submitter: meto@compatibility.info ---- Just another way to handle multiple uploads: <? function upload($FVARS) { for($i=0;$i<count($FVARS[file][tmp_name]);$i++) { $size=$FVARS[file][size][$i]; // filesize $type=$FVARS[file][type][$i]; // mime type $name=$FVARS[file][name][$i]; // original name $temp=$FVARS[file][tmp_name][$i]; // temporary name if($size) { //whatever to do with uploaded files echo "original name: $name<br />"; echo "temporary name: $temp<br />"; echo "mime type: $type<br />"; echo "size: $size<hr />"; } } } upload($HTTP_POST_FILES); // or $_FILES or whatever ?> Using this function every <input type="file" name="file[]"> will be handled.

« previous php.notes (#50860) next »