CodeIgniter Forums
Including CodeIgniter files into external app - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Including CodeIgniter files into external app (/thread-24756.html)



Including CodeIgniter files into external app - El Forum - 11-18-2009

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


Including CodeIgniter files into external app - El Forum - 11-19-2009

[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


Including CodeIgniter files into external app - El Forum - 11-19-2009

[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 :-)