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

[eluser]Phil Sturgeon[/eluser]
Code:
$IN        =& load_class('Input');
$LANG    =& load_class('Language');

/*
* ------------------------------------------------------
*  Load the app controller and local controller
* ------------------------------------------------------
*
*  Note: Due to the poor object handling in PHP 4 we'll
*  conditionally load different versions of the base
*  class.  Retaining PHP 4 compatibility requires a bit of a hack.
*
*  Note: The Loader class needs to be included first
*
*/
if ( ! is_php('5.0.0'))
{
    load_class('Loader', FALSE);
    require(BASEPATH.'codeigniter/Base4'.EXT);
}
else
{
    require(BASEPATH.'codeigniter/Base5'.EXT);
}

Spot the issue there.

get_instance() is set in Base4/Base5.php so this is not an error, just part of the architecture.

You'd be better off making a MY_Controller which calls the database, then make a MY_Language that has a set_line() method to set your new lang items.


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