CodeIgniter Forums

Full Version: Including CodeIgniter files into external app
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
Hi folks, I've tried searching and haven't had much luck. I'm trying to include files generated by CodeIgniter into other applications either by SSI includes or PHP includes. Is this possible? If so, what should the target be?

El Forum

[eluser]eoinmcg[/eluser]
Hi,

Not too sure I fully understand the question. Do you want to include content generated from your CI views? If so, this isn't going to work in most cases. You can, of course use fopen to read remote files:
Code:
$file = fopen ("http://yoursite/controller/method/params/", "r");
etc

You could also use 'file_get_contents' or CURL

El Forum

[eluser]Unknown[/eluser]
Yes, I'm trying to include the content generated from CI which did not work via SSI, or php's include();. But thank you for the response, CURL was able to pull it off :-)