Hi there.
I have a simple PHP page, on the same domain, which is to be called via an ajax request. The PHP page is to perform a custom query on the database and return JSON encoded data.
I could easily manually create database connections but is there a way to plug into the EE API to take advantage of all the Direct Record functions?
You can access the entirety of your ExpressionEngine system really easily by just requiring your index.php file in an output buffer. You can then use the get_instance() function to access the ExpressionEngine/CodeIgniter system.
ob_start();
require '/path/to/index.php';
ob_end_clean();
$EE =& get_instance();Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.