Welcome Guest, Not a member yet? Register   Sign In
common controllers across applications
#1

[eluser]palaniappanc[/eluser]
I'm trying to find a way to share controllers between multiple applications. here's my setup :

commonapp (contains the common controllers and models)
appA (accessed from appA.com)
appB (accessed from appB.com)
...

I want appA.com/controllerX/functionY and appB.com/controllerX/functionY to call the same controller that is located at commonapp/controllers/controllerX

What are the ways to do this, assuming I can't create symlinks?

Thank you!
#2

[eluser]doni[/eluser]
you might try this function to call any controller you'd like
Code:
function get_class( $path )
{
      require_once( realpath( $path.'.php' ) );

      $name = end( explode( '/', $path ) );

      $class = ucfirst( $name );

      $ci =& get_instance();

      $ci->$name =& new $class();

      return $ci->$name;

}
#3

[eluser]wiredesignz[/eluser]
@palaniappanc, redirect()? , webservice? or Modular Extensions.




Theme © iAndrew 2016 - Forum software by © MyBB