CodeIgniter Forums
BASEPATH question! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: BASEPATH question! (/showthread.php?tid=13624)



BASEPATH question! - El Forum - 11-30-2008

[eluser]Lazos[/eluser]
This code
Code:
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
should be included at every class? (Controllers/libraries/models)


BASEPATH question! - El Forum - 11-30-2008

[eluser]Colin Williams[/eluser]
It just prevents the file from loading outside the CI "stack." So, yeah, generally you should do that.


BASEPATH question! - El Forum - 11-30-2008

[eluser]Lazos[/eluser]
Thanks!