How to add css and js to codeigniter?

0

My code:

<link rel="stylesheet" type="text/css" href="<?php echo base_url('/resourse/rs-plugin/css/settings.css');?>" media="screen" />

But I get the error:

GET http://mi_ip/mi_web/resourse/rs-plugin/css/settings.css 404 (Not Found)

When I try to enter the file directly, I get the error:

  

404 Page Not Found

All files and routes exist but can not find them ...

What do I lack? Thank you!

    
asked by Alf 03.08.2018 в 04:57
source

2 answers

0

You have to change base_url to site_url, it would be something like that

<?php echo site_url('/resourse/rs-plugin/css/settings.css');?>
    
answered by 03.08.2018 в 23:24
0

Modify the variable "base_url" in the application / config / config.php file with the url of your web:

$config['base_url'] = 'http://www.miweb.com/carpeta';
    
answered by 04.08.2018 в 00:12