问题
I would like to connect to function world() but I get an error. Do you know what I have to do? There are my first steps with CodeIgniter - I'm doing this tutorial.
Urls I've tried:
- localhost/nauka/index.php/hello/world
- localhost/nauka/index.php/Hello/world
Error:
Fatal error: Class 'Controller' not found in C:\wamp\www\nauka\application\controllers\hello.php on line 5
Screenshot:

回答1:
Your controller should extend CI_Controller
class Hello extends CI_Controller {
public function __construct()
{
parent::__construct();
}
This may be different for older versions but you shouldn't be using versions that don't extend CI_Controller anyhow.
Also, you need the parent::__construct in there
回答2:
class Hello extends CI_Controller
来源:https://stackoverflow.com/questions/14656932/controller-error-in-codeigniter-and-doctrine-tutorial