I am new in Codeigniter. I tried to load my css file but i failed. I search it google apply all solution but its not working.
I also made changes in mu autoload
file
$autoload['helper'] = array('url', 'form');
Here is my Controller code with name Login.php
<?php
class Login extends CI_Controller{
function index(){
$this->load->helper('url');
$this->load->helper('html');
$data['main_content'] = 'login_form';
$this->load->view('include/template', $data);
}
}
?>
And Here is My View Code Name with login_form.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel = "stylesheet" type = "text/css" href = "<?php echo base_url();?>css/style.css">
<title>Untitled Document</title>
</head>
<body>
<div id="login_form">
<h1>Login Page..!!</h1>
<?php
echo form_open('login/validate_credentials');
echo form_input('username', 'Username');
echo form_password('password', 'Password');
echo form_submit ('submit', 'Login');
?>
</div>
</body>
</html>
Here is my Folder Structure
Config
controller
css
helper
models
views