title: CodeIgniter BASEPATH
body: <p>Hi I am new to Codeigniter. From my understanding of the <code>BASEPATH</code>, it is used to activate the Codeigniter framework. The code</p>
  
  <pre><code>defined('BASEPATH') OR exit('No direct script access allowed');
  </code></pre>
  
  <p>is used at top of the page to prevent direct access to the controller. But it is not working in my code. When I try to directly access a view via controller, the view gets loaded. I have checked <code>index.php</code> and <code>BASEPATH</code> is defined there. Please advice.</p>