To indicate to Codeigniter
where your files are css
or imagenes
you can do it in the following way:
For example, I have at the same level as the folder application
a folder called assets
and to reference from a view you can use base_url()
that leaves you a url absoluta
.
<link rel="stylesheet" href="<?echo(base_url() . 'assets/dist/css/mod.css')?>">
I am sending to call a file css
that is within assets/dist/css/
, for imágenes
is similar.
<img src="<?echo(base_url() . 'assets/dist/img/user2-160x160.jpg')?>" alt="User Image">
Within the same folder assets
I have a folder of img
, css
, js
and whatever is necessary.
To load a vista
it is not necessary to call the file as such html
, you can do it in the following way:
$this->load->view('design/index');