Welcome Guest, Not a member yet? Register   Sign In
Get variables created in MY_Controller?
#4

[eluser]InsiteFX[/eluser]
Your constructor is wrong CodeIgniter's core is PHP4
When you extend the MY_Controller then you can use PHP5 constructor.

Code:
class  MY_Controller extends Controller{

    function __construct(){  
      parent::__construct(); <--- WRONG! should be parent::Controller();
      define('COMPANY_EMAIL','[email protected]');
      $this->data['company_email']='[email protected]';
    }

}

Enjoy
InsiteFX


Messages In This Thread
Get variables created in MY_Controller? - by El Forum - 03-09-2010, 10:59 AM
Get variables created in MY_Controller? - by El Forum - 03-09-2010, 11:52 AM
Get variables created in MY_Controller? - by El Forum - 03-09-2010, 01:29 PM
Get variables created in MY_Controller? - by El Forum - 03-10-2010, 03:20 PM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 03:22 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 04:34 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 04:38 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 06:24 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 06:39 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 07:24 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 07:52 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 08:36 AM
Get variables created in MY_Controller? - by El Forum - 03-11-2010, 08:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB