[請益] CI的縮圖

看板PHP作者 (拾貳)時間13年前 (2012/03/08 03:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
PHP 5.X CI 2.1.0 我為了要讓縮圖方便點,寫了個helper function my_manipulation($data=array()){  $CI =& get_instance();  $img_resize_config['image_library'] = 'gd2';  $img_resize_config['maintain_ratio'] = TRUE;  $img_resize_config['source_image'] = $data['source_image'];  $img_resize_config['new_image'] = $data['new_image'];  $img_resize_config['width'] = $data['width'];  $img_resize_config['height'] = $data['height'];  $CI->load->library('image_lib',$img_resize_config);  $CI->image_lib->resize(); } 可以很順利的縮圖沒錯,不過都只能縮一次,假設我要做三種不同大小的縮圖 分別是 500*500、300*300、100*100 可是只有第一個會順利縮圖,其它都沒反應,我試著在每次都echo個東西出來, 確定是有再跑的,不過結果還是一樣,$CI->image_lib->clear();也用過了。 有誰能幫幫我嗎??? THX -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.233.136.85
文章代碼(AID): #1FLxWV8b (PHP)
討論串 (同標題文章)
以下文章回應了本文
完整討論串 (本文為第 1 之 2 篇):
文章代碼(AID): #1FLxWV8b (PHP)