I am trying to follow some tutorials regarding CodeIgniter, in particular ones about extending the controller, the tutorial I am following says that in the MY_Controller file I should put the following:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Controller extends Controller
{
function __construct()
{
parent::__construct();
}
}
However when I do that I get the following error:
Fatal error: Class 'Controller' not found in /home/chimeri1/public_html/application/libraries/MY_Controller.php on line 3
If however I put CI_Cntroller instead of Controller it works. What is the differance?
Also should the closing php tag ?> be added to the bottom of the MY_Controller file, some tutorials miss this out?
Thanks in advance.