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


You need to login to view comments.