codeigniter
Moderator: General Moderators
codeigniter
I am using codeigniter framework in my website. When i access header file from view in the index function of controller it works fine
but when i call header file in another function inside a controller css and images are not working.. Please help me..
Re: codeigniter
Make sure your CSS and image and Javascript paths are absolute: with a leading slash. Otherwise they're relative to the "current directory" in the URL. Like
Code: Select all
<link rel="stylesheet" type="text/css" href="/path/to/file.css">Re: codeigniter
I am giving my css link like this..
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/myfile.css')?>">
But this is working in index function.. but not working in other functions
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/myfile.css')?>">
But this is working in index function.. but not working in other functions
Re: codeigniter
How is it not working? Is it generating an error message? Generating the wrong path? Nothing at all?