title: Codeigniter define basepath or exit
body: <p>I noticed this small bit of code above a controller on a demo codeigniter project and wondered what it did and whether I should be using it.</p>
  
  <pre><code>defined('BASEPATH') OR exit('No direct script access allowed');
  </code></pre>
  
  <p>Also if I should use it where should it be used? controllers? models? both? etc..</p>