CodeIgniter Forums
issue with controllers Help!!! :( - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: issue with controllers Help!!! :( (/thread-25701.html)

Pages: 1 2


issue with controllers Help!!! :( - El Forum - 12-21-2009

[eluser]DJMOHNL[/eluser]
[quote author="CI_avatar" date="1261469663"]you did not initialize your controller

Code:
class Blog extends Controller
{
   //you missed this one
   //function Blog()
   //{
   //   parent::Controller();    
   //}

   function index()
   {
      echo “Hello world!”;      
   }
}
[/quote]

Yup thats true..

Code:
function Test()
    {
        // you missed this one..
        parent::Controller();// must be inside main controller function!


        // Below here you load libraries, helpers, configuration files and so on.
                $this->load->helper('myhelper'); // example
            
    }