Welcome Guest, Not a member yet? Register   Sign In
Use/Call CI outside by using normal PHP
#1

[eluser]onikage997[/eluser]
hi all,

I'm in a situation right now where my CI files are inside a folder in the root like
..
folder1
folder2
ci_files
index.html

I'm using the CI right now for admin purposes.

Now my problem is that I need to create a normal php file maybe inside folder1 like "communications.php" and I want to use my libraries and models inside my ci_files.

actually I've done some experimenting like adding
Code:
require('../ci_files/index_outside.php');

inside my communications.php. Code inside index_outside.php is just similar to CI index.php with slight adjustments to paths but what happens is that this will always redirect me to the root.

Is there a right way setup that I need to do inside my normal php "communications.php" so I can access my ci_files?

I hope you can help me guys. thanks


#2

[eluser]solid9[/eluser]
Why not include your communications.php into your CI library, if that is a class.
And load as normal class inside CI.




Theme © iAndrew 2016 - Forum software by © MyBB