1

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

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0
<?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

I want to call class from another codeigniter (directory) example: Call A codeignitor (login) class from B Codeigntor directory (test) class

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.