|
本帖最后由 sindy 于 2009-6-25 12:25 编辑
class Imageresize extends Controller {
function index()
{
$this->load->library('Image_lib');
$this->load->helper('array');
$config['image_library'] = 'gd2';
$config['source_image'] = '/image/MA-FLY-040.jpg';
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 300;
$config['height'] = 300;
$this->load->library('image_lib', $config);
if ( ! $this->image_lib->resize())
{
echo $this->image_lib->display_errors('<p>', '</p>');
}else
{
echo "New Image <img src=\"../system/application/image/MA-FLY-040_thumb.jpg\" width=300 height=300 border=0 />";
}
}
}
这样运行以后 我看不到缩略图呢? |
|