CodeIgniter 使用手冊版本 2.2.0


更新 1.5.4 到 1.6.0

在準備更新之前,你應該把 index.php 換成靜態檔,這樣即可暫時休站。

步驟一: 更新 CodeIgniter 檔案

把 system 目錄中的這些檔案換上新的版本:

注意: 如果之前在這些目錄裡頭,有任何你自己所開發的檔案,請記得要複製進去。

步驟二: Add time_to_update to your config.php

Add the following to system/application/config/config.php with the other session configuration options

$config['sess_time_to_update'] = 300;

步驟三: Add $autoload['model']

Add the following to system/application/autoload.php

/*
| -------------------------------------------------------------------
| Auto-load Model files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('my_model');
|
*/

$autoload['model'] = array();

步驟四: Add to your database.php

Make the following changes to your system/application/config/database.php file:

Add the following variable above the database configuration options,with $active_group

$active_record = TRUE;

Remove the following from your database configuration options

$db['default']['active_r'] = TRUE;

Add the following to your database configuration options

$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

步驟五: 更新使用手冊

也請別忘了把 local 的使用手冊換上新的版本。