title: Error When Loading View in My_Controller
body: <p>I have been trying to implement the solution referenced at:</p>
  <p><a href="https://stackoverflow.com/questions/4708639/error-when-trying-to-load-view-in-my-controller">Error when trying to load view in my_controller</a></p>
  <p>Don't know why, but Aptana indicates a syntax error on my line:</p>
  <pre><code>parent::load-&gt;view('common/header_out');
  </code></pre>
  <p>...which is seconded by the interpreter when I execute:  &quot;unexpected T_OBJECT_OPERATOR&quot;</p>
  <p>EDIT:  Previously I tried using:</p>
  <pre><code>$this-&gt;load-&gt;view('common/header_out');
  </code></pre>
  <p>...which generated the following errors:</p>
  <blockquote>
  <p>Warning: include(application/errors/error_php.php) [function.include]: failed to open stream: No such file or &gt;directory in /home/uom2/www/system/core/Exceptions.php on line 167</p>
  <p>Warning: include() [function.include]: Failed opening 'application/errors/error_php.php' for inclusion &gt;(include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/uom2/www/system/core/Exceptions.php on &gt;line 167</p>
  </blockquote>
  <p>I am using CI 2.0.</p>
  <p>Any help would be appreciated.</p>
  <p>application/core/Uom_Controller.php</p>
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Uom_Controller  extends CI_Controller
  {
  
    public   $data = array();  // Array to store data - passed to views.
   protected  $view_path = null;  // Here to overide the view path if n
   
      public function __construct()
      {
          parent::__construct();
  
      }
  
      protected function check_session()
      {
          //Here goes your function
      }
  
   protected function render() {
  
  
        $data['page_title'] = 'Your title';
    $data['page_title'] = 'Your title';
  
        parent::load-&gt;view('common/header_out');
        parent::load-&gt;-&gt;view('home/home', $data);
        parent::load-&gt;-&gt;view('common/foot');
  
  echo &quot;view rendered:  &quot;.date('Y-m-d H:i:s');
  
  
  
  }
  
  }
  </code></pre>
  <p>controllers/home/home.php</p>
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Home   extends Uom_Controller  {
  
      function __construct()
      {
          parent::__construct();
  
        // Set the view path manually for this method.
        $this-&gt;view_path = 'home/home.php';
  
      }
  
  
      function __destruct() {
          $this-&gt;render();
      }
  
  
      public function index()
      {
          echo &quot;home updated&quot;;
          
      }
  
  
      public function out()
      {
          echo &quot;logout&quot;;
          echo &quot;&lt;br&gt;&quot;;
          echo $this-&gt;view_path;
          echo &quot;&lt;br&gt;&quot;;
          
      }
  
  
  }
  </code></pre>
  <p>obviously the intention is similiar to the SO post at the top of this post:  I want the $this-&gt;render(); to be called and render my page header, body, and footer.</p>
  <p>(My next task is to add the authentication check to this MY_Controller pattern, so I am hoping that whaever solution works for calling views also works on models.</p>
  <p>Thanks everyone and I really have spent hours trying to find a solution to this beforw once again turning to SO.</p>