CodeIgniter Forums
Class 'Controller' not found - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Class 'Controller' not found (/showthread.php?tid=58924)



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