Welcome Guest, Not a member yet? Register   Sign In
Intergrating CI into External Project
#1

[eluser]Unknown[/eluser]
Hello There,

I have fairly recently picked up codeigniter and so far im loving the flexibility and ease of this framework.

I have a little issue i was hoping somebody could help me out on. Im looking to run codeigniter in a wordpress installation but im running into a few issues and im out of ideas.

Im looking to ideally call a controller and related methods so i can leave wordpress to managed core functionality but offer extended features via codeigniter. I can't quite get my head around how to do this however.

If we remove wordpress out of the equation for now... I have an standalone php file where im including my codeigniter bootstrap. Within this external file im then looking to pull a controller to run. I have attempted to do this using get_instance but im not sure this can be done, eg:

Code:
// some code here

include('/path/to/bootstrap');

$CI =& get_instance();
        
echo $CI->load->controller('welcome');

// continue code

As mentioned above im not even 100% sure this can be done - any advice will be greatly received.

Thanks, Phil
#2

[eluser]tonanbarbarian[/eluser]
i have included ci into joomla before and it was fairly easy
i made a php file that converted the joomla GET parameters into a correct ci URI, and then updated the $_SERVER variable so that CI could pass the GET parameters to determine the controller and method to run etc
then the php file included the codeigniter index.php file.

worked like a treat
you should be able to do something similar for wordpress




Theme © iAndrew 2016 - Forum software by © MyBB