Site_url does not work on CodeIgniter

2

I'm following a CodeIgniter tutorial. This code snippet is not working on my machine, I've set everything up right until the other tutorials have worked, but this code snippet is not working:

<a href="<?php echo site_url()?>sobre">Sobre</a>

In the tutorial it worked nice, but not here.

    
asked by anonymous 18.07.2015 / 02:44

1 answer

1

You should load the helper url, either in the autoload or in the controller:

If it is in autoload application/autoload.php search for $autoload['helper'] = array('url');

If it is in controller $this->load->helper('url');

    
18.07.2015 / 16:02