user3077503
user3077503

Reputation:

About the security of the CodeIgniter View files

In beginning of the libraries and models etc. of the CodeIgniter, we have this line which prohibits any direct and thus illegitimate access:

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

should (or must) the view files have this line at their beginning?

Upvotes: 2

Views: 44

Answers (1)

Mostafa Talebi
Mostafa Talebi

Reputation: 9173

It is better to avoid it because the view files does not contain any security code usually, if you any, then that's another story...

Upvotes: 2

Related Questions