CodeIgniter Forums

Full Version: using codeigniter instance in different php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]xeroblast[/eluser]
how do i include the database wrapper of codeigniter in my different php files?

http://www.example.com/ci -> using codeigniter

http://www.example.com/other -> using standard php (no framework)

i want to use the codeigniter database wrapper in my 'other' directory?

i.e
Code:
<?php
include(codeigniter_database_wrapper);
$db = new Codeigniter_database_wrapper();
$query = $db->get('my_table');
$result = $query->result();
?>
something like this...

thanks in advance...

p.s. : i want to use this because some people in the company i am working dont know much about frameworks so i'll just want them to use their current php skills and all their database queries are pass in this extended php class file.

El Forum

[eluser]xeroblast[/eluser]
i have found this and this is what i wanted. thanks..

http://hasin.me/2007/06/13/using-activer...deigniter/