Error when trying to get data through controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Error when trying to get data through controller (/showthread.php?tid=49829) |
Error when trying to get data through controller - El Forum - 03-05-2012 [eluser]bleu[/eluser] I am new to codeigniter and I am getting the following error Code: A PHP Error was encountered My welcome controller has the following Code: public function view($pagename) My welcome_model has the following Code: public function get_page($name = 'Hi'){ Can Anybody help me as to why I am getting this error? Error when trying to get data through controller - El Forum - 03-05-2012 [eluser]Glazz[/eluser] Maybe you didn't load the model. Try loading the model in your controller like this: Code: $this->load->model('your_model_name_here'); Error when trying to get data through controller - El Forum - 03-05-2012 [eluser]bleu[/eluser] Thansk that helped |