qiusenvs 发表于 2009-7-20 14:45:42

文件上传 上传jpg图片 提示 upload is not allowed.

如题
上传的时候提示
The filetype you are attempting to upload is not allowed.

jpg


$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|jpeg|jpe';
$config['max_size'] = '2048';
$config['max_width']= '1024';
$config['max_height']= '768';

gif可以上传

什么原因啊!急死我了。。。

Hex 发表于 2009-7-20 14:57:57

http://codeigniter.org.cn/forums/thread-442-1-1.html

sueijing 发表于 2012-6-5 11:53:41

我也有这个问题
libraries下upload.php   的这个方法 _file_mime_type($file)
        if (function_exists('mime_content_type'))
                {
                        $this->file_type = @mime_content_type($file['tmp_name']);//这里返回是false;
                        return;
                }

有可能php版本的问题 mime_content_type 取不到类型;

sueijing 发表于 2012-6-5 11:54:43

我暂时是.注释掉这里的判断了.上传成功了
页: [1]
查看完整版本: 文件上传 上传jpg图片 提示 upload is not allowed.