從 3.0.6 升級到 3.1.0

在執行升級之前,你應該更換 index.php 為靜態檔案,將網站導向此靜態網頁。

步驟 1:更新網站 CodeIgniter 檔案

取代 system/ 目錄打下的所有目錄與檔案

步驟 2: 檢查你的 PHP 版本

We recommend always running versions that are currently supported, which right now is at least PHP 5.6.

PHP 5.2.x versions are now officially not supported by CodeIgniter, and while 5.3.7+ may be at least runnable, we strongly discourage you from using any PHP versions below the ones listed on the PHP.net Supported Versions page.

步驟 3: If you’re using the ‘odbc’ database driver, check for usage of Query Builder

Query Builder functionality and escape() can no longer be used with the ‘odbc’ database driver.

This is because, due to its nature, the ODBC extension for PHP does not provide a function that allows to safely escape user-supplied strings for usage inside an SQL query (which our Query Builder relies on).

Thus, user inputs MUST be bound, as shown in Running Queries, under the “Query Bindings” section.