note 105763 rejected from function.move-uploaded-file by danbrown

From: Date: Tue, 13 Sep 2011 14:21:22 +0000
Subject: note 105763 rejected from function.move-uploaded-file by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183134@lists.php.net to get a copy of this message
Note Submitter: julian at freeform dot ca ---- The example code on this page looks incorrect to me, but maybe I'm missing something. Why is ["pictures"]["tmp_name"][$key] used to access info from the array? Is the [$key] necessary? Is that a bug? Wouldn't it be more correct to iterate over $_FILES like this: foreach($_FILES as $fileName=>$data) { if($data['error'] == UPLOAD_ERR_OK) { $tmp_name = $data['tmp_name']; // etc ?? } }

« previous php.notes (#183134) next »