Restrict direct access to a file in a CodeIgniter


/ Published in: PHP
Save to your folder(s)

Put this at the top of your CodeIgniter models, controllers, libraries and helpers to restrict direct access to them.


Copy this code and paste it in your HTML
  1. if (!defined('BASEPATH')) exit('No direct script access allowed');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.