Page 1 of 1

Fatal Error: Class 'Controler' not found...

PostPosted: 25. October 2013 22:42
by Kaloyan
My first time with this, please help me solve the problem!
I write this code in notepad and save as "site.php" - all files, open with Chrome by typing "http://localhost/ci/index.php/site", and this error appears:

Fatal error: Class 'Controller' not found in C:\xampp\htdocs\ci\application\controllers\site.php on line 3

..the code:
<?php
class Site extends Controller
{
function index()
{
echo 'hello';
}
}
?>


Would You please help me?
Thank You!

Re: Fatal Error: Class 'Controler' not found...

PostPosted: 26. October 2013 10:28
by Altrea
The error message is as clear as it could be.
You extend a class named "Controller". Where is that class?

Re: Fatal Error: Class 'Controler' not found...

PostPosted: 26. October 2013 12:47
by Kaloyan
Thank You for reply!
Well, I don't know man, I'm very new in this, tell me what to do?
I've been following this tutorial: http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-day-1/

Re: Fatal Error: Class 'Controler' not found...

PostPosted: 26. October 2013 15:19
by Kaloyan
THIS IS THE ANSWER:

http://path/to/codeigniter/index.php/<controller>/<function>/<param>
So, in my case, it should be:

http://localhost/project1/CodeIgniter_2.1.0/index.php/hello
$config['base_url'] should be set to the index.php, so it should be:

$config['base_url'] = 'http://localhost/project1/CodeIgniter_2.1.0/index.php';
DOCS: http://codeigniter.com/user_guide/general/urls.html

found it in stackoverflow...

Re: Fatal Error: Class 'Controler' not found...

PostPosted: 26. October 2013 18:36
by Altrea
We can't provide any support for third party ressources like Codeigniter or issues of tutorials for that anyhow.