这是我试图运行的代码..
我已将图像存储在路径为C:\xampp\htdocs\ci\images
的图像文件夹中,并且与应用程序文件夹的图像文件夹处于同一级别
public function display(){
$config['image_library'] = 'gd2';
$config['source_image'] = '/images/mypic.jpg';
$config['new_image']='/images/re_mypic.jpg';
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 75;
$config['height'] = 50;
$this->load->library('image_lib', $config);
$this->image_lib->resize();
}
我没有收到任何错误或
答案 0 :(得分:0)
添加此项并检查代码错误
if ( ! $this->image_lib->resize()) {
echo $this->image_lib->display_errors();
}