0
Good morning, I’m learning to use codeigniter, and I’m having a problem with my css... inside the Applications folder I created another folder called layout, which inside it will have a header.php and a footer.php. When I access my view I call this header and footer. Until then ok! in the Applications folder also has another folder called Assets that inside has the following folders - css and Sass.
In my header, I am unable to reach the css file... in my autoload I set the url, and in mine config.php the default url is this way:
$config['base_url'] = 'http://localhost:8888/project_system_hair/project/system_hair/';
and in my header.php is like this:
<link rel="stylesheet" type="text/css" href="<?=base_url('assets/css/teste.css')?>">
When executing and giving element Inspect my href stays this way...
<link rel="stylesheet" type="text/css" href="http://localhost:8888/project_system_hair/project/system_hair/assets/css/teste.css">
That is the way it is right... but the console accuses an error saying:
GET http://localhost:8888/project_system_hair/project/system_hair/Assets/css/teste.css net:ERR_ABORTED and so I can’t use my css.
NOTE: the path of my folder inside the notebook: /Applications/MAMP/htdocs/project_system_hair/project/system_hair/application/Assets/css
Could someone help me? Thank you....
try this: <link rel="stylesheet" type="text/css" href="css/test.css"> href do not use "http://localhost..."
– Daniel Fortunato
Try using relative path instead of absolute.
– Sam
You are using the . htaccess file?
– Phelipe
Yes... has a base url definition and Rewriterule . * index.php/$0 [PT, L]
– Nathan