CodeIgniter 使用手冊版本 2.2.0


更新 1.4.1 到 1.5.0

注意: The instructions on this page assume you are running version 1.4.1. If you have not upgraded to that version please do so first.

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

步驟一: 更新 CodeIgniter 檔案

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

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

步驟二: 更新 datebase.php 檔

Open your application/config/database.php file and add these new items:

$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';

步驟三: 更新 config.php 檔

Open your application/config/config.php file and ADD these new items:

/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries.  For more information please see the user guide:
|
| http://www.codeigniter.org.tw/user_guide/general/core_classes.html
| http://www.codeigniter.org.tw/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';

/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly,enabling you to utilize that syntax
| in your view files.  Options are TRUE or FALSE (boolean)
|
*/
$config['rewrite_short_tags'] = FALSE;

In that same file REMOVE this item:

/*
|--------------------------------------------------------------------------
| Enable/Disable Error Logging
|--------------------------------------------------------------------------
|
| If you would like errors or debug messages logged set this variable to
| TRUE (boolean).  注意: You must set the file permissions on the "logs" folder
| such that it is writable.
|
*/
$config['log_errors'] = FALSE;

Error logging is now disabled simply by setting the threshold to zero.

步驟四: 更新 main index.php 檔

If you are running a stock index.php file simply replace your version with the new one.

If your index.php file has internal modifications,please add your modifications to the new file and use it.

步驟五: 更新使用手冊

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