title: Fatal Error: Call to member function on a non-object Code Igniter
body: <p>I followed the documentation on Models and I keep getting this error, any help would be appreciated.</p>
  
  <p>A PHP Error was encountered</p>
  
  <p>Severity: Notice</p>
  
  <p><strong>Message: Undefined property: Manage::$File</strong></p>
  
  <p>Filename: files/manage.php</p>
  
  <p>Line Number: 14</p>
  
  <p>Fatal error: Call to a member function get_files() on a non-object in /var/www/uisimulator/application/controllers/files/manage.php on line 14*</p>
  
  <p><strong>Here is my Model: - Located: application/models/files/file.php</strong></p>
  
  <pre><code>class File extends CI_Model {
  
      var $filename = '';
  
      function __construct() {
          parent::__construct();
      }
  
      // Return all config files
      function get_files() {
          $query = $this-&gt;db-&gt;get('config_files');
          return $query-&gt;result();
      }
  
      function insert_file(&amp;#41; {
          $this-&gt;filename = $this-&gt;input-&gt;post('filename');
          $this-&gt;db-&gt;insert('config_files', $this);
      }
  
      function update_file(&amp;#41; {
          $this-&gt;filename = $this-&gt;input-&gt;post('filename');
          $this-&gt;db-&gt;update('config_files', $this, array('id' =&gt; $this-&gt;input-&gt;post('id'));
      }
  }
  </code></pre>
  
  <p><strong>Here is my Controller: Location: application/controllers/files/manage.php</strong></p>
  
  <p>class Manage extends CI_Controller {</p>
  
  <pre><code>    function __construct() {
          parent::__construct();
      }
  
      public function index() {
          $this-&gt;load-&gt;model('files/file', TRUE);
  
          $config_files['query'] = $this-&gt;File-&gt;get_files();
  
          // Load the head section
          $this-&gt;load-&gt;view('head');
  
          // Load the view, passing in the data
          $this-&gt;load-&gt;view('files/index', $configFiles);
  
          // Load Footer
          $this-&gt;load-&gt;view('footer');
      }
  }
  </code></pre>
  
  <p><strong>Inside my view I have a simple loop to show the results:</strong></p>
  
  <pre><code>  &lt;?php foreach ($configFiles as $file) : ?&gt;
          &lt;li&gt;&lt;?php echo $file['filename'];?&gt;&lt;/li&gt;
     &lt;?php endforeach;?&gt;
  </code></pre>