Some considerations for upgrading the project from CodeIgniter 2.2 to CodeIgniter 3.0, codeigniter2.2_php Tutorial

Source: Internet
Author: User
Tags codeigniter

Some considerations for upgrading the project from CodeIgniter 2.2 to CodeIgniter 3.0, codeigniter2.2


1. Replace all files and folders in the system directory, and replace index.php

2. The first letters of the files in controllers and models need to be capitalized: application.php-application.php, m_application.php-m_application.php

3. Replace config/mimes.php

4. Remove the $auto_load[' core ' from the config/autoload.php

5. The use of the session library has changed significantly: The main thing in the project is to modify the Unset_user_data function

//  Old $this->session->unset_userdata (array(' item ' = ', ' item2 ' = ') '); // New $this->session->unset_userdata (array(' Item ', ' item2 '));

6. Update the config/database.php file

$active _group = ' default '; // $active _record = TRUE; $query _builder TRUE ; // $db [' Default '] [' dbdriver '] = ' mysql '; $db [' Default '] [' dbdriver '] = ' mysqli ';

7. Copy the Errors folder under the CI3.0 Views folder to the Views folder of the project.

8. Update the config/routes.php file, CI3.0 (: Any) does not include '/'

(.+)    // matches anything (: Any)  // matches any character, except for '/'

For more information, please see: http://codeigniter.org.cn/user_guide/installation/upgrade_300.html

http://www.bkjia.com/PHPjc/1056840.html www.bkjia.com true http://www.bkjia.com/PHPjc/1056840.html techarticle Some considerations for upgrading the project from CodeIgniter 2.2 to CodeIgniter 3.0, codeigniter2.2 1. Replace all files and folders in the system directory, and replace index.php 2. Control ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.