The ci-php system file cannot be found. Is it encrypted?

Source: Internet
Author: User
ClassPageextendsbase_controller {} is an open-source ci system. When page is instantiated, You need to instantiate the base_controller class first, but I have rummaged through the files in the entire system directory and have not found it, cannot be found either. Is it encrypted? c... class Page extends base_controller {

}

This is a ci open-source system. When page is instantiated, You need to instantiate the base_controller class first, but I have searched the files in the entire system directory and have not found it, it cannot be found. Is it encrypted? ci cannot find an open-source system that can be learned.

Reply content:

Class Page extends base_controller {

}

This is a ci open-source system. When page is instantiated, You need to instantiate the base_controller class first, but I have searched the files in the entire system directory and have not found it, it cannot be found. Is it encrypted? ci cannot find an open-source system that can be learned.

This is not the base class that ci comes with. It should be a custom class that you use for source programs. Some so-called open-source programs may encrypt key code.

CI suggests that all your controllers inherit a master controller (such as base_controller) and perform initialization and authentication.

Base_controller does not exist by default. You need to create a new one. The textbooks you read are not suitable for new users. This is an experience.

Please refer to: http://codeigniter.org.cn/user_guide/toc.html

If you do not need to perform other operations or initiate such operations, you can directly inherit CI_Controller.
If you want to create:

class Base_Controller extends CI_Controller { function __construct() {  parent::__construct(); }}

Case Sensitive

CI 2.0 Statement

class Page extends CI_Controller {}

Or Press @ Kslr to put it in the core folder.

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.