Reputation: 3
In the below code i have used codeigniter code i have found a error class not found. Class 'Controller' not found in C:\wamp\www\todo1\application\controllers\login.php on line 3
<?php
class Login extends Controller {
function index()
{
$data['main_content'] = 'login_form';
$this->load->view('includes/template', $data);
}
?>
Upvotes: 0
Views: 1268
Reputation: 96
You need CI_Controller
class Login extends CI_Controller {
Upvotes: 1
Reputation: 8528
In codeigniter ( I think version 2.x.x ) you should use the following instead:
class Login extends CI_Controller {
function index()
{
$data['main_content'] = 'login_form';
$this->load->view('includes/template', $data);
}
Upvotes: 1