Unable to locate the specified class while calling another controller in codeigniter

     

I have following code for controller Qprs


class Qprs extends CI_Controller {
public function xyz()   {   //some code    }
}  

below code used to call above controller from another controller


$this->load->library('../controllers/Qprs');   $this->Qprs->xyz();  

but getting error:
  Unable to locate the specified class Qprs.php  
   How to solve such error?

  
"
answer1
  
  

Very simple way in codeigniter to call a method of one controller to other controller


1. Controller A    class A extends CI_Controller {
public function __construct()   {   parent::__construct();   }   function custom_a()   {   }  }
2. Controller B
class B extends CI_Controller {
public function __construct()   {   parent::__construct();   }   function custom_b()   {   require_once(APPPATH.'controllers/a.php'); //include controller   $aObj = new a(); //create object    $aObj->custom_a(); //call function   }  }