Answer the question
In order to leave comments, you need to log in
Codeigniter: How to explain to the framework that the class should be loaded automatically?
Good afternoon.
It so happened that I needed to write something in Codeigniter 3. I think it’s clear that the base CI_Controller doesn’t have half of the necessary functionality, so I decided to make my Base_Controller in the Base_Controller.php file
class Base_Controller extends CI_Controller
{
}
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends Base_Controller
{
public function index()
{
$this->load->view('welcome_message');
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question