Is there a way to load code igniter in an external file
I have a problem with a flash call and I need to de开发者_C百科bug, before messing with the code I was wondering if it's possible to load the whole CI environment inside a xxx.php file.
Basically I would need to do this:
$CI->controller->method();
and only that, nothing should be loaded automagically, the thing is that once loaded the controller should be able to "see" all the models, libraries and config files.
Basically what I want is to be able to call CI forcing to load a specific controller->method.
Thank you very much.
EDIT:
I have been able to achieve this. If anybody stumbles upon this question and needs to do this, here is the file: http://www.0plus1.com/stackoverflow/CIHack.php
I would just include the index.php file that comes with CI as this run's the whole framework!
<?php
include("index.php");
$CI->controller->method();
?>
精彩评论