$this->gb->get->('entries') Problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: $this->gb->get->('entries') Problem (/showthread.php?tid=17930) Pages:
1
2
|
$this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]GamingFusion[/eluser] I'm getting this error, I'm completing the CodeIgniter tutorials. I was wandering if i was doing something wrong. Quote:Fatal error: Call to a member function get() on a non-object in /home/.maybelle/gfadmin/site.gamingfusion.net/system/application/controllers/feed.php on line 14 to see the actual page with the error go to GamingFusion Site $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]GamingFusion[/eluser] heres my controller Code: 1| <?php $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]tomcode[/eluser] [quote author="GamingFusion" date="1240268294"]heres my controller Code: 14| $data['query'] = $this->db->get('entries'); You try to call the function get() of a object that is not declared on line 14, so I guess You have not loaded the database ($this->db) $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]GamingFusion[/eluser] well i am autoloading the database core library Code: $autoload['core'] = array('database'); is that code right and is there anything else i have to do yet, i have also setup the database file. Code: $db['default']['hostname'] = "hostname"; $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]Dam1an[/eluser] I'm not sure what version you're using, but the database class is auto loaded under libraries (at least now) $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]tomcode[/eluser] Try Code: $autoload['libraries'] = array('database'); instead of 'core'. autoload core is deprecated. (that's why it is commented out, at least in recent CI versions). Do You really have Code: $db['default']['hostname'] = "hostname"; $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]GamingFusion[/eluser] i'm using 1.7.1, if it has changed please tell, because i'm just following the videos like i said that were from 1.3 on the site. he should make new ones. $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]GamingFusion[/eluser] tomcode no i just changed them for the post, and the core libraries is not even in the config.php file anymore so i added it $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]GamingFusion[/eluser] ok i got that fixed thanks tomcode, but now i get some more errors with my view file. just to the link i gave in my first post. heres my view file code Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> $this->gb->get->('entries') Problem - El Forum - 04-20-2009 [eluser]GamingFusion[/eluser] i forgot heres my controller code Code: <?php |