failed to work with base_url in Codeigniter 2.2.6

1

I'm trying to load bootstrap files into Codeigniter using base_url (). My autoload.php file has the following configuration
$autoload['helper'] = array('url');
In my view I put inside the head the following code.

 <link rel="stylesheet" href='<?= base_url("css/bootstrap.css"); ?>'>   

And on my Controller I put the following call:

$this->load->helper('url');
    
asked by anonymous 14.03.2016 / 20:09

1 answer

1

You can configure the url of the project by setting a value for $config['base_url'] This variable is in the config.php file in the config folder.

$config['base_url'] = '/ci/'; 
    
14.03.2016 / 20:19