![]() |
Segment troubles + new problem - 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: Segment troubles + new problem (/showthread.php?tid=9406) |
Segment troubles + new problem - El Forum - 06-24-2008 [eluser]Jesse2303[/eluser] Hi all A word before Yes, I have red the user docs. Yes, I tried to solve this on my own, but I can't solve this. Ok, here we go. I have a fucntion that calls nieuws_bekijk and I have a view file nieuws_bekijk_view.php Well , when I run the script, it says: Quote:A PHP Error was encountered Quote:Fatal error: Call to a member function segment() on a non-object in C:\UsbWebserver\Root\ciAdmin\system\application\controllers\main.php on line 62 What I need to do ? The function Code: function nieuws_bekijk() { nieuws_bekijk_view.php Code: <!-- Kleine stijlwijziging van het extern stijlbestand --> Segment troubles + new problem - El Forum - 06-24-2008 [eluser]parrots[/eluser] The segment method is on the uri class, not the url helper. Change Code: $this->db->where('nieuwsid', $this->url->segment(3)); to Code: $this->db->where('nieuwsid', $this->uri->segment(3)); Segment troubles + new problem - El Forum - 06-24-2008 [eluser]Jesse2303[/eluser] [quote author="parrots" date="1214332947"]The segment method is on the uri class, not the url helper. Change Code: $this->db->where('nieuwsid', $this->url->segment(3)); to Code: $this->db->where('nieuwsid', $this->uri->segment(3)); Thanks it worked |