![]() |
How can I add outside code in codeigniter? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: How can I add outside code in codeigniter? (/showthread.php?tid=1345) |
How can I add outside code in codeigniter? - clark - 03-01-2015 Hello everyone, I have an outside code or script, for example, including functions, classes inside even connecting database. Is there any way to add this code into codeigniter as class libraries or customized codes? Please explain more details if yes. Thanks much RE: How can I add outside code in codeigniter? - Kaosweaver - 03-02-2015 You can include the file inside of the main index.php file like you would any other included file (and you'd treat it like any other included file for instantiation of classes/objects, etc). Alternatively, you could do a MY_Contoller.php in the core which loads them up via the constructor as a library. |