0
votes

I am trying to set up hmvc in codeigniter 3.1.3 using https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads. I have autoloaded my session library $autoload['libraries'] = array('session'); However when I create MY_Controller that extends MX_Controller I get an error

Unable to locate the specified class: Session.php

This is MY_Controller.php

 <?php
class MY_Controller extends MX_Controller {

  function __construct() {

    parent::__construct();
  }
}
1
So did you get the same message when you tried to load the session directly in your MY_Controller.php constructor? i.e $this->load->library('session'); - TimBrownlaw
@TimBrownlaw yes I did that. The error is gone but I dont understand why the autoload throws up errors - user7060819

1 Answers

1
votes

i found a simple solution. when you extends MX_Controller in MY_Controller then you will used MY_Controller everywhere

Example:

class Welcome extends MY_Controller {

    public function index()
    {
        $this->load->view('welcome_message');
    }
}