2
I’m following a tutorial of Codeigniter this snippet of code is not working on my machine, I’ve set everything right, even the other tutorials have worked, but this snippet of code is not working:
<a href="<?php echo site_url()?>sobre">Sobre</a>
In the tutorial worked cool, but here not.
Actually, this is loading the url helper?
$this->load->helper('url')
. And I usually put the link inside the parentheses, even working outside, I think it looks better visually!<a href="<?php echo site_url('sobre')?>">Sobre</a>
– Marcelo Diniz
How do I load the URL Helper? Marcelo.
– Israel Sousa
Within View itself or Controller?
– Israel Sousa
Or you can upload it to your application/autoload.php file or controller. If it’s autoload .
$autoload['helper'] = array('url', 'html');
, if in controller$this->load->helper('url');
– Marcelo Diniz
Create there the answer I will mark as the right answer.
– Israel Sousa