开发者

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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜