• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

#1
[eluser]Unknown[/eluser]
hello guys.
this line "if ( ! defined('BASEPATH')) exit('No direct script access allowed')"
helps me to prevent fake http header requests?

#2
[eluser]InsiteFX[/eluser]
No it stops them from getting into that file, there is also an .htaccess file in the application directory that stops them.

#3
[eluser]CroNiX[/eluser]
All requests should go through index.php, which is where BASEPATH gets defined. That line prevents them from accessing stuff like http://yoursite/application/models/some_model.php via the URL and directly accessing the model, library, whatever. It's a security measure. The htaccess that InsiteFX mentioned also prevents that but not all servers are set up to use htaccess. So the above will work regardless if htaccess is set up and working.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.