Reputation: 465
I want to call A (Codeigniter) login Class and it functions from B Codeigniter. Anyone can explain and share idea how can do this. Thanks
Upvotes: 1
Views: 12941
Reputation: 1109
This question is similar to:
How to load a controller from another controller in codeigniter?
or Codeigniter call function within same class
Try this, you will get solution.
Upvotes: 1
Reputation: 39
<?php
class MY_Controller extends CI_Controller {
public function is_logged()
{}
}
class Home_Controller extends MY_Controller {
public function show_home()
{
if (!$this->is_logged()) {
return false;
}
}
}
?>
Upvotes: 0