title: Codeigniter 3 - Unable to locate the specified class: Session.php
body: <p>Hey guys i am wondering why i always get <strong>Unable to locate the specified class: Session.php</strong></p>
  
  <p>I'm trying to do is I have a controller and I want to inherit the other controller but when i call the method of the inherit controller it returns <strong>Unable to locate the specified class: Session.php</strong></p>
  
  <p>E.G</p>
  
  <p>Controller A</p>
  
  <pre><code>class controller_a extends CI_Controller {
      public function __construct() {
          parent::__construct();
           $this-&gt;load-&gt;model("model");
      }
  
      public function methodA () {
         //the pagination codes
      }
  }
  </code></pre>
  
  <p>Controller B</p>
  
  <pre><code>include_once (dirname(__FILE__) . "/controller_a.php");
  
  class controller_b extends controller_a {
      public function __construct() {
           parent::__construct();
           $this-&gt;load-&gt;library("session");
      }
  
      public function methodB() {
          $a = new controller_a();
          $this-&gt;load-&gt;view("head");
          $this-&gt;load-&gt;view("navbar");
          $a-&gt;methodA();
          $this-&gt;load-&gt;view("footer");
      }
  }
  </code></pre>
  
  <p>I don't why it keeps returning the error. Can anyone help me in this problem? Thanks. </p>