网站制作学习网PHP→正文:CodeIgniter You did not select a file to upload
字体:

CodeIgniter You did not select a file to upload

PHP 2012/6/14 11:33:17  点击:不统计

%77w%77%2E%66%6F%72%61%73%70%2E%63%6E

在php框架CI2以上版本做php框架上传文件时,出现了You did not select a fileto upload,这样的上传错误提示,单在实际上传中已经选择了文件。
解决方法。
1.首先确定自己的form提交 有enctype="multipart/form-data"配置
2.提交的file表单name比如为upfilename,那么你在controllers中获取的时候也要用该名称$this->upload->do_upload("upfilename")

这两个保持一致。
这样就不会出现You did not select a file to upload找不到上传文件的情况了。

当上传中文名称文件的时候出现
A problem was encountered while attempting to move the uploaded file tothe final destination.
这个错误提示,原因就中文名称,将中文更改为其他字母数字等即可。


学习www.网for站asp制.cn作

·上一篇:数据库配置以及参数codeIgniter >>    ·下一篇:php统计数组不同内容数量 >>
推荐文章
最新文章