用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3320|回复: 6
收起左侧

[已解决] 上传exe格式的问题

[复制链接]
发表于 2011-3-5 18:13:41 | 显示全部楼层 |阅读模式
exe格式在mimes里是允许的格式呀,可是为什么我的就是传不上去呢老是提示“The filetype you are attempting to upload is not allowed.”下面是源码:
function do_upload()

{

  $config['upload_path'] = './uploads/';

  $config['allowed_types'] = 'rar|exe|doc|docx|gif|jpg|png';

  $config['max_size'] = '10000';

  $config['max_width']  = '1024';

  $config['max_height']  = '768';

  

  

  $this->load->library('upload', $config);



  if ( ! $this->upload->do_upload())

  {

   $error = array('error' => $this->upload->display_errors());

   

   $this->load->view('upload_form', $error);

  }

  else

  {

   $data = array('upload_data' => $this->upload->data());

   

   $this->load->view('upload_success', $data);

  }

}
发表于 2011-3-5 22:17:01 | 显示全部楼层
参考 FAQ 置顶帖,添加 mimes 即可。
 楼主| 发表于 2011-3-5 22:38:21 | 显示全部楼层
可是exe已经在mimes有了啊


QQ截图未命名.jpg
HEX大大~
发表于 2011-3-6 01:15:24 | 显示全部楼层
CI 版本是?
 楼主| 发表于 2011-3-6 08:17:03 | 显示全部楼层
1.7.2版的
发表于 2011-3-6 10:35:12 | 显示全部楼层
换新版 CI 试试,这可能是个 BUG。
 楼主| 发表于 2011-3-6 20:43:45 | 显示全部楼层
我知道了,不是BUG,是我浏览器的问题,我用IE或者火狐就没事,用谷歌就不行,还是非常感谢HEX大大

本版积分规则