winnie damayo
winnie damayo

Reputation: 426

is it recommended in codeigniter to always include the basepath?

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

Answers (2)

Tpojka
Tpojka

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

Related Questions