文件上传 上传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可以上传
什么原因啊!急死我了。。。 http://codeigniter.org.cn/forums/thread-442-1-1.html 我也有这个问题
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 取不到类型; 我暂时是.注释掉这里的判断了.上传成功了
页:
[1]