Welcome Guest, Not a member yet? Register   Sign In
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.




Theme © iAndrew 2016 - Forum software by © MyBB