Welcome Guest, Not a member yet? Register   Sign In
Extends Controller Problem
#1

[eluser]Sarwar CSE[/eluser]
I have a controller name system which is extend MYController from core, and i want to extend it from two controller name adminpanel and user panal. like

Code:
//file Path: application/controller/system.php
class system extends MY_Controller{
     function __construct(){
         parent::__construct();
      }
    function ShowWelcomeMessage(){
         echo "welcome";
    }
}

//file Path: application/controller/adminpanel.php
class adminpanel extends system{
     function __construct(){
         parent::__construct();
      }    
}

class userpanel extends system{
     function __construct(){
         parent::__construct();
      }    
}
Quote:the url "http://localhost/test/index.php/userpanel/ShowWelcomeMessage" shows this error
Code:
Fatal error: Class 'System' not found in G:\projects\Test\application\controllers\adminpanel.php on line 2
if possible to solve this without using include(),require() in CodeIgniter like
Code:
<?php require_once(APPPATH."controllers/system.php"); ?>

Please Advice me.....


Messages In This Thread
Extends Controller Problem - by El Forum - 06-13-2011, 12:23 AM
Extends Controller Problem - by El Forum - 06-13-2011, 04:00 AM
Extends Controller Problem - by El Forum - 06-13-2011, 04:51 AM
Extends Controller Problem - by El Forum - 06-13-2011, 04:59 AM
Extends Controller Problem - by El Forum - 06-13-2011, 02:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB