Background Information
I just installed a fresh copy of CI and modified the welcome controller to include the url Helper so I can call the
You forgot a crucial thing;
class Welcome extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->helper('url'); //Loading url helper
}
public function index()
{
$this->load->view('home'); //Loading home view
}
}
The parent::__construct
. If you don't do that; the Controller will not inherit it's abstract layer when you override the __construct in your own controller.
As long as you don't override your __construct
it's all ok. It only happens when you override it. You don't have the load
functionality because the Welcome class is empty (no inheritance), even if it extends the CI_Controller
(but with a __construct
override).