風雨流離 发表于 2012-8-25 23:18:30

裁切圖片类怎么用不到= =

                $config['image_library'] = 'GD2';
                echo $config['source_image'] = base_url().'uploads/'.'1345907309718090_src.jpg';
                $config['new_image'] = base_url().'uploads/'.'1345907309718090_src.jpg';
                //$config['create_thumb'] = TRUE;
                $config['maintain_ratio'] = TRUE;
                $config['master_dim'] = 'height';
                $config['width'] = 192;
                $config['height'] = 192;
               
                $this->load->library('image_lib');
               
                $this->image_lib->initialize($config);
               
                echo $this->image_lib->resize();

The path to the image is not correct.Your server does not support the GD function required to process this type of image.Your server does not support the GD function required to process this type of image.
什么事啊我有GD庫啊,wampsever

longfeiyu 发表于 2012-11-22 13:40:27

我也遇到这个问题了

longfeiyu 发表于 2012-11-22 14:05:59

亲,路径写错了。 './images/mypic.jpg'; 写成这种就OK 了 其中 ./代表根目录 base_url();

还有手册教程里面忘记写了这段$this->image_lib->initialize($config);
Your server does not support the GD function required to process this type of image.
Your server does not support the GD function required to process this type of image.
一直出现这个错误。
页: [1]
查看完整版本: 裁切圖片类怎么用不到= =