OK so basically I'd like to load the EE framework and its container outside of an ExpressionEngine path... I know there's been some questions about this, but I haven't found a great answer, and it seems like a good question for the forum. I, like, never ask questions so why not?
Given this simple situation (EE 2.9+):
Web root and ExpressionEngine root:
Outside of EE file:
Is there some way I can initialize the framework in that
/random-folder/index.php file? I specifically want to load the database class (and possibly a few others). I know I can probably load CI classes just fine, which is close, but I don't know how it would work with trying to launch the framework there for class use from the
ee() container (think
ee()->db, etc..). I know I could probably figure this out on my own, but I rarely have a really good question, so I'm accepting answers, suggestions, as well as warnings against this idea. If anyone has accomplished this successfully, I'd love to hear about it, and am extra inviting to security questions and concerns. Thanks to any who have any ideas.
P.S. Yes, I can do everything I want to in that
/random-folder/index.php file in pure PHP, but this is related to an addon development and I'd like that file's contents to have the code structure and feel of an ExpressionEngine addon file.