title: codeigniter cannot extends the My_Controller.php
body: <p>I have created <code>MY_Controller.php</code> in the <code>core folder</code>. I autoloaded all the <code>libraries</code> and <code>model</code> that i want in my <code>website</code>. And also put some data in the <code>MY_Controller.php</code>. but when I extend this controller by another controller the data cannot be extended in the second controller. This is <code>MY_Controller.php</code> code.</p>
  
  <pre><code>&lt;?php
  if (!defined('BASEPATH')) exit('No direct script access allowed');
  class MY_Controller extends CI_Controller
  {
     public $data;
     public function __contstruct()
      {
          parent::__construct();
          date_default_timezone_set('Asia/Karachi');
          $this-&gt;load-&gt;library(array('ion_auth', 'form_validation','form'));
          /*-Website Developer Information-*/
  
          $this-&gt;data['FullName']="Waqas Dev lover";
          $this-&gt;data['ShortName']="Dev Lover";
          $this-&gt;data['Mobile']="03049211134";
          $this-&gt;data['Version']="1.0.1";
          $this-&gt;data['Copyright']="Waqas Dev Lover";
          $this-&gt;data['Year']=date("Y");
          $this-&gt;data['DevelopedBy']="Waqas Dev Lover";
          $this-&gt;data['DevelopedByUrl']="http://www.facebook.com/xndltwaqas1";
          /* -End of Website Developer Information- */
          /*System Information */
          $this-&gt;data["SectionH1"]="Admin panel";
          /*End of System Information */
  
          /*User Information */
         $user_id =$this-&gt;session-&gt;userdata('user_id');
         //echo  =$this-&gt;ion_auth-&gt;logged_in();
         //exit;
          $this-&gt;data['user'] = $this-&gt;ion_auth-&gt;user($user_id)-&gt;row();
          //$this-&gt;get_user_groups($user_id);
          $this-&gt;data['group']=$this-&gt;ion_auth_model-&gt;get_users_groups($user_id)-&gt;result();
          //var_dump($this-&gt;data['group']);
          //exit();
          /*End User Information */
      }
  
       public function show($path,$data=NULL){
          if($data === NULL){
              $data = $this-&gt;data;
              var_dump($data); exit;
          }
          $this-&gt;load-&gt;view("template/header",$data);
          $this-&gt;load-&gt;view("template/sidebar",$data);
          $this-&gt;load-&gt;view($path,$data);
          $this-&gt;load-&gt;view("template/footer",$data);
      }  
  }
  ?&gt;
  </code></pre>
  
  <p>And this is the <code>Dashboard.php</code> in which I want to extends the <code>MY_Controller.php</code>. But it Won't extends the Data in the <code>Dashboard.php</code>.</p>
  
  <pre><code>&lt;?php
  if (!defined('BASEPATH')) exit('No direct script access allowed');
  
  class Dashboard extends MY_Controller{
      public function index(){
          $this-&gt;show("admin/home");
      }
  }
  </code></pre>