Welcome Guest, Not a member yet? Register   Sign In
Use CI inside of plain php files
#1

Is it possible to use CI3 inside of ordinary PHP files (not related to CI)?

Something like Wordpress allows us to do:
Code:
require('./wp-blog-header.php');


And then we can use all WP functions inside of our PHP file.

I remember I was able to do that with CI2 using some hacking (making different index.php file or something like that) but I'm looking for a (nicer) solution for CI3.
Reply
#2

(This post was last modified: 06-01-2015, 10:32 PM by techbat.)

it would be work fine as well as in CI3, but i would recommend you to use third party package library, to load external resource into CI MVC.

click here to see CI 3 documentation.
Passionate PHP Programmer & Codeigniter Developer :- Always happy to help you!
Reply
#3

Hacking is inevitable. http://iridadesign.com/starter-public-ed...c/demo.php
Reply
#4

Thanks, this seems to be just what I was looking for, I will inspect it further Smile

(06-01-2015, 10:31 PM)techbat Wrote: it would be work fine as well as in CI3, but i would recommend you to use third party package library, to load external resource into CI MVC.

I think I need it the other way around - instead of loading 3rd party php file into CI, I want to load CI into third party php file.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB