Part of the EllisLab Network
   
 
In model file
Posted: 28 April 2009 01:57 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  73
Joined  12-12-2007

Does it really need to use the below sentence on the top of model file?

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
 Signature 

audentis fortuna iuvat
CodeIgniter Turkey

Profile
 
 
Posted: 28 April 2009 03:59 AM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
Avatar
RankRankRankRankRank
Total Posts:  2674
Joined  05-18-2008

Firstly, I think its better to have it just in case, although it shouldn’t be needed if you have htaccess pushing everything through you’re index.php file, meaning you can’t access the file directly.
You also wouldn’t need it if you have the applicatiuon folder out of the web root, as it can’t be called directly either.

 Signature 

I’m building a Project Management System for my 3rd year Uni project, Sign up to the beta
Track my progress | Post of the day: UI Designs
Get full auto complete support for CodeIgniter in Eclipse

Profile