我正在使用IMAGE CRUD来处理图片库,上传是正确的,插入到表中是正确的但是显示thumnbails图像是错误的,这是IMAGE CRUD生成的图像缩略图的网址示例:
<img src="http://localhost/macoutlet/http://localhost/macoutlet/assets/uploads/thumb__http://localhost/macoutlet/http://localhost/macoutlet/assets/uploads/673d7-kim-kardashian-gingerly.jpg" class="basic-image" height="60" width="90">
有谁知道原因或如何解决这个问题?
答案 0 :(得分:0)
不知道原因,可能是因为htaccess重写或类似。
修复:在第373行附近的文件/application/libraries/image_crud.php中找到以下行:
$results[$num]->thumbnail_url = base_url().$this->image_path.'/'.$this->thumbnail_prefix.$row->{$this->url_field};
并替换为:
$thumbUrlBugFix = explode('/', $row->{$this->url_field});
$results[$num]->thumbnail_url = base_url().$this->image_path.'/'.$this->thumbnail_prefix.end($thumbUrlBugFix);