Thursday, 15 January 2015

php - error while working with the codeigniter -



php - error while working with the codeigniter -

i newbie codeigniter while wrkng ci, got error follows:

fatal error: class 'controller' not found in c:\wamp\www\codeigniter\application\controllers\hello.php on line 3

call stack # time memory function location 1 0.0237 150568 {main}( ) ..\index.php:0 2 0.0425 186632 require_once( 'c:\wamp\www\codeigniter\system\core\codeigniter.php' ) ..\index.php:202 3 0.3513 658176 include( 'c:\wamp\www\codeigniter\application\controllers\hello.php' ) ..\codeigniter.php:250

this error got. in controllers folder saved hello.php had next contents:

class hello extends controller { function hello() { parent::controller(); } function you() { $this->load->view('you_view'); } }

and in view folder saved you_view.php had contents as:

hello, you!

i can't clear these errors pls help me. in advance.

the default in codeigniter this:

// ci_controller not controller class hello extends ci_controller { public function __construct() { parent::__construct(); // constructor codes etc. } public function you() { $this->load->view('you_view'); } }

php codeigniter

No comments:

Post a Comment