CodeIgniter - Returning uploaded file data
Im using codeigniters file upload library .... everyt开发者_开发知识库hing works fine except i want to output the uploaded file details.
I have the following code
$uploaddata = $this->upload->data('userfile');
foreach($uploaddata as $details){
echo $details['file_name'];
}
The above code keeps erroring with the following
Message: Undefined index: file_name
Could someone let me know where im going wrong,
Cheers
I don't know the problem, but I think it will help you if you first know "what is the content of $uploaddata" by writing: var_dump($uploaddata) just before foreach loop...
精彩评论