Welcome Guest, Not a member yet? Register   Sign In
Loading db from an extended library
#1

[eluser]Unknown[/eluser]
Hello,
I'm using CI 1.7.2 with PHP 5.
I'm trying to load data from a db to populate an array inside a library (language) I extended (ie: MY_language).
I tried doing the
Code:
$CI =& get_instance()
to be able to load db class but get an fatal error stating that:<br>
Code:
Call to undefined function get_instance() in /path/application/libraries/MY_Language.php on line [29]
The line #29 it's when it's trying reference the CI object.

Why do I want to do this? I need to be able to load the supported languages (supported by my app) to 3 different files, and want it to be automatic instead of hand-edited like now.

Any ideas?

Thanks,

Fefo


Messages In This Thread
Loading db from an extended library - by El Forum - 02-27-2010, 05:31 AM
Loading db from an extended library - by El Forum - 03-15-2010, 09:19 AM
Loading db from an extended library - by El Forum - 03-15-2010, 10:28 AM
Loading db from an extended library - by El Forum - 03-15-2010, 10:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB