I have two controllers a and b.
a
b
I would like to call a method of controller a from a method of controller b.
test.php Controller File :
test.php
Class Test { function demo() { echo "Hello"; } }
test1.php Controller File :
test1.php
Class Test1 { function demo2() { require('test.php'); $test = new Test(); $test->demo(); } }