使用CI禁止目录访问

I am unable to access the directory it display "Directory access forbidden" please help me as I am new in CI

<?php     
 if ( ! defined('BASEPATH')) exit('No direct script access allowed');  
$config['base_url'] = 'emoneygifts.projects-codingbrains.com/index.php';

?>

from the documentation https://codeigniter.com/user_guide/installation/index.html in your application/config/config.php make setting like this

$config['base_url'] = 'http://'. $_SERVER['HTTP_HOST'] .'/your_project/'; 

once your done, access your website at : http://localhost/your_project/index.php

Example:

$config['base_url'] = localhost/Project_name/index.php';

OR

$config['base_url'] = 'http://'. $_SERVER['HTTP_HOST'] .'/project_name/index.php';