title: Use of undefined constant APPATH - assumed 'APPATH'
body: <p>I encounter this Error and i can't Fix it, Someone please help me T_T </p>
  
  <hr>
  
  <p>A PHP Error was encountered</p>
  
  <p>Severity: Notice</p>
  
  <p>Message: Use of undefined constant APPATH - assumed 'APPATH'</p>
  
  <p>Filename: controllers/Pages.php</p>
  
  <p>Line Number: 4</p>
  
  <p>Backtrace:</p>
  
  <p>File: C:\xampp\htdocs\Project\application\controllers\Pages.php
  Line: 4
  Function: _error_handler</p>
  
  <p>File: C:\xampp\htdocs\Project\index.php
  Line: 315</p>
  
  <h2>Function: require_once</h2>
  
  <p>and this is my Code</p>
  
  <hr>
  
  <pre><code>&lt;?php
  class Pages extends CI_Controller{
      public function view($page = 'home'){
          if(!file_exists(APPATH.'views/pages'.$page.'php')){
              show_404();
          }
  
          $data['title'] = ucfirst($page);
  
          $this-&gt;load-&gt;view('tenplates/Header');
          $this-&gt;load-&gt;view('pages/'.$page, $data);
          $this-&gt;load-&gt;view('tenplates/Footer');
      }
  
  }
  </code></pre>