Welcome Guest, Not a member yet? Register   Sign In
defined('BASEPATH') OR exit('No direct script access allowed');
#2

The line exists to make sure the file is being used in a CodeIgniter environment. So I'd say the answer is it goes in any file where that is true. Controllers, Models and most other files that define a "class" would probably fit that description. Perhaps in views if they use CI classes, otherwise it's not necessary.
Reply


Messages In This Thread
RE: defined('BASEPATH') OR exit('No direct script access allowed'); - by dave friend - 10-17-2018, 12:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB