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
2
-
This may help you techsirius.com/2013/01/load-controller-within-another.htmlJenz– Jenz2014-04-05 09:24:17 +00:00Commented Apr 5, 2014 at 9:24
-
Thanks Jenz for your reply but I want to call class from another codeigniter (directory).user2365514– user23655142014-04-05 09:35:04 +00:00Commented Apr 5, 2014 at 9:35
Add a comment
|
2 Answers
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.
Comments
<?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;
}
}
}
?>
1 Comment
user2365514
I want to call class from another codeigniter (directory) example: Call A codeignitor (login) class from B Codeigntor directory (test) class