I have a requirement in one of my EE site wherein I need to insert some data in tables and make some channel entries using EE channel API,I am able to do this within a EE template using database class or channel API..like

 $this->EE->db->insert("INSERT QUERY");

But I have to do the same thing from a Php file which is located at root (same level of index.php file). Can anyone please help me out here.

I want to know what files to be included and what classes to be initiated or anything to be able to use EE object ($this->EE) within in a php file (located at root).

1 Answer 1


Check out Rob Sanchez' EE Bootstrap: https://github.com/rsanchez/ExpressionEngine-Bootstrap

It does just what you're looking for. I've used it myself for some projects where I didn't want to put code inside an EE add-on.

  • Thanks for the your reply....and sorry for my late reply :) May 12, 2014 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.