Codeigniter 3 si ajax demande

if (!$this->input->is_ajax_request()) {
   exit('No direct script access allowed');
}
Abdullah al Mamun