Problem with librarie - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Problem with librarie (/showthread.php?tid=25896) |
Problem with librarie - El Forum - 12-29-2009 [eluser]Browser[/eluser] Hello, i have created a librarie but i have a problem. This is the code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Conf_Lib { public $configuracion=array(); function Conf_Lib() { $this->CI = & get_instance(); $this->CI->db->get('configuracion'); $this->informacion(); } function informacion() { } } ?> Fatal error: Call to a member function get() on a non-object in /var/www/searchmedic2/application/libraries/conf_lib.php on line 10 Why? Thanks you. Problem with librarie - El Forum - 12-29-2009 [eluser]Tom Schlick[/eluser] there should not be a space in $this->CI = & get_instance(); make it this $this->CI =& get_instance(); |