Welcome Guest, Not a member yet? Register   Sign In
Issue with including a file in codeigniter folder from root

Ok, I am not really sure how you would handle this, because the CodeIgniter index.php loads all the CodeIgniter core and libraries it needs then it takes control and runs the default controller.

I do know that some users have taken libraires and modified the to be stand alone.

I think the conflict may be because both files are named index.php, but not sure.

You could try this, I sure that you need the full site path.
include("http://your path that shows when you go to your site/ci/index.php");


Hey, sorry if I got you agitated, just been up for hours trying to figure it out.. Ok, so I tried what you said and it threw me an error that URL-file access is not allowed on the server.. I google searched that problem and it threw me to a website with a couple of suggestions.. lo and behold the answer was this:


$includeFile = file_get_contents("http://www.YourDomain.com/ci/index.php");

echo $includeFile;

and it worked fine.. the only weird thing with it now is that the header of my feeds is able to be highlighted but the content is not.. it doesnt really matter right now, I just wanted it to work in general, but I got it up and running.. thanks a bunch!

Glad to hear that you got it working.

I guess the full path did the trick to give you the error to track it down.


Theme © iAndrew 2016 - Forum software by © MyBB