更新 1.6.3 到 1.7.0
在準備更新之前,你應該把 index.php 換成靜態檔,這樣即可暫時休站。
步驟一: 更新 CodeIgniter 檔案
把 system 目錄中的這些檔案換上新的版本:
- system/codeigniter
- system/database
- system/helpers
- system/language
- system/libraries
注意: 如果之前在這些目錄裡頭,有任何你自己所開發的檔案,請記得要複製進去。
步驟二: 更新 Session Table
If you are using the Session class in your application,AND if you are storing session data to a database,you must add a new column named user_data to your session table.
Here is an example of what this column might look like for MySQL:
user_data text NOT NULL
To add this column you will run a query similar to this:
ALTER TABLE `ci_sessions` ADD `user_data` text NOT NULL
You'll find more information regarding the new Session functionality in the Session class page.
步驟三: 更新 Validation Syntax
This is an optional,but recommended step,for people currently using the Validation class. CI 1.7 introduces a new Form Validation class,which deprecates the old Validation library. We have left the old one in place so that existing applications that use it will not break,but you are encouraged to migrate to the new version as soon as possible. Please read the user guide carefully as the new library works a little differently,and has several new features.
步驟四: 更新使用手冊
請把 local 的使用手冊換上新的版本,也別忘了 image 檔案。