飞雪残剑 发表于 2011-3-5 18:13:41

上传exe格式的问题

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);

}

}

Hex 发表于 2011-3-5 22:17:01

参考 FAQ 置顶帖,添加 mimes 即可。

飞雪残剑 发表于 2011-3-5 22:38:21

可是exe已经在mimes有了啊



HEX大大~

Hex 发表于 2011-3-6 01:15:24

CI 版本是?

飞雪残剑 发表于 2011-3-6 08:17:03

1.7.2版的

Hex 发表于 2011-3-6 10:35:12

换新版 CI 试试,这可能是个 BUG。

飞雪残剑 发表于 2011-3-6 20:43:45

我知道了,不是BUG,是我浏览器的问题,我用IE或者火狐就没事,用谷歌就不行,还是非常感谢HEX大大
页: [1]
查看完整版本: 上传exe格式的问题