开发者

file array giving different result for different browser

I am uploading a file in cake php.

<?php echo $form->create("Video",array('action'=>'add','name'=>'thisform','enctype'=>'multipart/formdata','onsubmit'=>'javascript: return validate();'));

echo $form->input("file_name",array('type'=>'file','id'=>'file_name','label'=>'','div'=>''));
echo $form->en开发者_如何转开发d();?>

In chrome I am getting the below

Array(

[Video] => Array(

       [file_name] => Array(

                [name] => imp.txt
                [type] => text/plain
                [tmp_name] => D:\xampp\tmp\php63.tmp
                [error] => 0
                [size] => 1568
       )

 )
) 

But in mozilla i am getting the below

Array(

[Video] => Array(

       [file_name] => 
    )
)


As I was using 'enctype'=>'multipart/formdata' ;it was not working in mozilla.

But when I write 'enctype'=>'multipart/form-data' and it works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜