On my controller home.php, i have this simple line:
<?php
class Home extends Controller {
function Home()
{
parent::Controller();
}
function index()
{
$data['message'] = 'Hello World';
$this->load->view('home_view', $data);
}
}
?>
On my view file home_view.php, i have this:
<html>
<head>
<title>myApp</title>
<link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
</head>
<body>
<?=$message?>
</body>
</html>
When i loaded the page, i noticed that the style.css was not getting loaded properly, then i changed the stylesheet href to :
<link rel=“stylesheet” type=“text/css” href=“system/application/views/styles.css” media=“screen” />
and this worked. Does this means, from now on, i have keep entering “system/application/views/” front of all my css and images? Is there not a easier way of doing this?
