I am trying to load a view from a controller file. If I reference my class in the view everything is fine, however if I reference a method from that class my css does not load.
Here is a simple example:
Controller file:
<?php
class Example extends CI_Controller
{
public function index ()
{
$this->load->view('myview');
}
}
In the view file this works fine:
<li><a href="<?=base_url('example');?>">EXAMPLE</a></li>
But, this does not:
<li><a href="<?=base_url('example/index');?>">EXAMPLE</a></li>
I also tried to use the site_url() function but the result was the same.
Note: I have loaded the URL helper.