Hi,
I want to write a small app on a server which I’m using expressionengine which can take advantage of expressionengines libraries. How do I set myself up to do this? I tried…
<?php
ob_start();
require 'index.php';
ob_end_clean();
$EE =& get_instance();
$EE->load->database('db_name');
$query = $EE->db->get('db_table');
foreach ($query->result() as $row)
{
print $row->surname;
}
?>Mostly doing this as a way to learn how to program with EE but I’m completely stuck. Any good reference material on this? I don’t want to create modules etc.
If you need access to the EE instance, or want the application to be part of EE (displayed in the backend or frontend), then you’ll need to create a ExpressionEngine module/extension/plugin, which will go in the system/expressionengine/thridparty/ folder. More info here: http://ellislab.com/expressionengine/user-guide/development/modules.html
Or you can create a separate application using the CodeIgniter library directly. CodeIgniter is the framework ExpressionEngine is built upon, and you can use those files for your application. You can access the same database and files if you want to, but you’ll have your own config files, and won’t have access to the EE instance.
I haven’t done this with EE, but I’ve worked with CodeIgniter before, so I’m guessing that the application folder (from the CodeIgniter zip file) can be added to your site, without the system folder, then change the paths in the index.php file of your application to point to the codeigniter library that expressionengine uses. Can anyone confirm this? More info here http://ellislab.com/codeigniter/user-guide/installation/index.html
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.