C
C
Crash2018-04-04 11:43:34
CodeIgniter
Crash, 2018-04-04 11:43:34

How to configure CI not to prescribe this line at the beginning of each controller?

Having started working with projects on CI after Yii2 ( at the request of the employer ), I was unpleasantly surprised that at the beginning of each controller I have to write this line:

defined('BASEPATH') OR exit('No direct script access allowed');

Straight archaism in its purest form, really this restriction could not be done at the system level? Does this framework have a special setting so that each time this is not written at the beginning of the controller file? Tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmitriy, 2018-04-04
@dmitriylanets

You can move all application, system directories to a level higher than document root, I think this is suitable as an alternative to this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question