CodeIgniter Forums
Class 'Controller' not found - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Class 'Controller' not found (/thread-58924.html)



Class 'Controller' not found - El Forum - 08-05-2013

[eluser]davy_yg[/eluser]
Hello,

I have this code:

application/controllers/latihancodeigniter.php


<?php
class Latihancodeigniter extends Controller
{
function index()
{
echo "Hello CodeIgniter";
}
}
?>


Then, this error appears:


Fatal error: Class 'Controller' not found in C:\xampp\htdocs\CodeIgniter_214\application\controllers\latihancodeigniter.php on line 4

Why is it? (I am using Codeigniter 2.1.4)


Class 'Controller' not found - El Forum - 08-05-2013

[eluser]PravinS[/eluser]
check $system_folder and $application_folder in index.php

refer: http://ellislab.com/codeigniter/user-guide/installation/


Class 'Controller' not found - El Forum - 08-05-2013

[eluser]sv3tli0[/eluser]
extend CI_Controller not Controller ! Smile

as its extended in the example.. https://github.com/EllisLab/CodeIgniter/blob/2.1-stable/application/controllers/welcome.php