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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby Kaloyan » 25. October 2013 22:42

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!
Kaloyan
 
Posts: 3
Joined: 25. October 2013 22:32
Operating System: Windows 8

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

Postby Altrea » 26. October 2013 10:28

The error message is as clear as it could be.
You extend a class named "Controller". Where is that class?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

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

Postby Kaloyan » 26. October 2013 12:47

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/
Kaloyan
 
Posts: 3
Joined: 25. October 2013 22:32
Operating System: Windows 8

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

Postby Kaloyan » 26. October 2013 15:19

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...
Kaloyan
 
Posts: 3
Joined: 25. October 2013 22:32
Operating System: Windows 8

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

Postby Altrea » 26. October 2013 18:36

We can't provide any support for third party ressources like Codeigniter or issues of tutorials for that anyhow.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 139 guests