shuang12a 发表于 2013-3-28 11:54:34

缩略图制作成功后服务器上没有缩略图文件

   缩略图制作成功后但是服务器上没有缩略图文件
求大神 谢谢了
public function do_thumb($path)
   {
            $jpg = strrchr($path,'.');
            $name = strrev(substr(strrchr(strrev($path),'.'),1));
            $new = '_thuumb'.$jpg;

            $config['image_library'] = 'gd2';
            $config['source_image'] = $path;
            $config['new_image'] = $new;
            $config['create_thumb'] = TRUE;
            $config['maintain_ratio'] = TRUE;
            $config['width'] = 100;
            $config['height'] = 150;

            $this->load->library('image_lib', $config);

            if($this->image_lib->resize()){

                  return $name.$new;

            }else{
                echo $this->image_lib->display_errors();
            }
   }


页: [1]
查看完整版本: 缩略图制作成功后服务器上没有缩略图文件