CodeIgniter Forums
Use codeigniter objects in an external php file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Use codeigniter objects in an external php file (/showthread.php?tid=20665)



Use codeigniter objects in an external php file - El Forum - 07-17-2009

[eluser]Bernat Bonet[/eluser]
I want to use language codeigniter libraries (the loaded object) in an external php file.
I ask if the only way to do this is to inclide in that file the path to language libraries, or is there a way to pass to the file both language selected and the object $this->lang.

If I localize the file in application/views/folder, will this file heredade codeigniter objects?

Now I'll explain the subject I want to do:

I've js files defining gui interface and I want to write only one js file per language and the language fields will be assigned dynamically with language files.

I've a controller that process the file and generate js file in the selected language, but the problem is that I need to include language files and I want to use codeigniter libraries language.

Thanks a lot.