1. 替換掉system目錄下所有的文件和資料夾,以及替換掉index.php
2. controllers和models中的文件首字母都需要改成大寫:Application.php -> Application. php, m_Application.php -> M_Application.php
3. 替換掉config/mimes.php
4. 移除$auto_load['core']從config/autoload.php
4. 把$auto_load['core']移除5. session函式庫的使用有了較大改變:專案裡主要是修改了unset_user_data函數<span>//</span><span> Old</span><span>$this</span>->session->unset_userdata(<span>array</span>('item' => '', 'item2' => ''<span>)); </span><span>//</span><span> New</span><span>$this</span>->session->unset_userdata(<span>array</span>('item', 'item2'));
<span>$active_group</span> = 'default'<span>; </span><span>//</span><span> $active_record = TRUE;</span><span>$query_builder</span> = <span>TRUE</span><span>; </span><span>//</span><span>$db['default']['dbdriver'] = 'mysql';</span><span>$db</span>['default']['dbdriver'] = 'mysqli';
(.+) <span>//</span><span> matches ANYTHING</span>(:any) <span>//</span><span> matches any character, except for '/'</span>
以上就介紹了專案從Codeigniter 22升級至 Codeigniter 30的一些注意事項,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。