Reputation: 426
is it recommend to always put the code below in every file in Code igniter?
defined('BASEPATH') OR exit('No direct script access allowed');
Upvotes: 0
Views: 46
Reputation: 1
No mandatory at all, to make cool site, you can modify your url, with uri libraries.
Ex: yoursite.com/clothes/man
Upvotes: 0
Reputation: 7111
Although is not mandatory, that line ensures all requests done to the script had to go through index.php
file where BASEPATH
constant is actually defined.
Upvotes: 2