Welcome Guest, Not a member yet? Register   Sign In
How can I add outside code in codeigniter?

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

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.

Theme © iAndrew 2016 - Forum software by © MyBB