Posts

Showing posts from 2014

Codeigniter 上傳縮圖 檔案沒出來但處理為 TRUE

$CI->load->library('image_lib',$img_resize_config); 照上面寫的話, Codeigniter 縮圖只會處理一次 要處理多張的話 要拆開寫如下 $CI->load->library('image_lib' ); $CI->load->initialize($img_resize_config); 但是我不管怎麼試就是縮圖出不來, 而且 $CI->image_lib->resize(); 一直都是正確的 TURE 值 後來才發現問題在第二行,改成如下搞定 $CI-> image_lib ->initialize($img_resize_config); 完整的縮圖  helper function 如下 function thumbMaker($data = array()){ $CI =& get_instance(); $img_resize_config['image_library'] = 'gd2'; $img_resize_config['source_image'] = $data['upload_data']['full_path']; $img_resize_config['new_image'] = './pimage/1111'.'002.jpg'; $img_resize_config['create_thumb'] = TRUE; $img_resize_config['maintain_ratio'] = TRUE; $img_resize_config['width'] = 100; $img_resize_config['height'] = 100; $CI->load->library("image_lib"); $CI-> image_lib ->in

[Codeiginter] 首頁可開,其他項目 404 error

原因: http://localhost 可開,但將檔案移至 http://localhost/new 則只能開啟首頁,其他項目 404 error 主要是 .htaccess 檔路徑設定問題,改為以下紅字可解決     RewriteBase / new     RewriteRule ^(.*)$ / new/ index.php?/$1 [L]

[Codeiginter] Your system folder path does not appear to be set correctly

Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php 在安裝 Codeigniter 時,不知道為什麼出現這個問題,檢查後 解決方法是:確定 system 資料夾有正確上傳並上傳到與 index.php 同位置。不知是主機問題還是 filezilla 的問題,system 資料夾就是會一直 missed 掉。