I am totally new in CodeIgnitor. In the controllers folder I created a file named caller.php and I created a file home.php in views. In views I also created a folder named css and I created style.css in that css folder. In views I have some pictures. Those pictures are also part of design. Now I want to use style.css and the pictures. But I can’t.
In caller.php I have:
class caller extends CI_Controller
{
function index()
{
$this->load->view('home');
// What do I have to write here to load css?
}
}
In home.php I have:
<html>
<head>
***------what i have to write here to load css--------***
</head>
<body>
<div id="outer">
...
</div>
</body>
</html>
If additional configs are needed please mention that.
Leading on from what Oliver said of including the stylesheet with:
If you have removed index.php from your URL’s make sure you include your css directory in the rewrite rule.
This is assuming your stylesheet is located in a folder called
cssat the root of your application.Make sure that you have enabled the URL helper to use commands such as
base_url(). This can be done globally insideconfig/autoload.phpby adding url to the helper array.