![]() |
base_url() error - 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: base_url() error (/showthread.php?tid=11894) |
base_url() error - El Forum - 09-27-2008 [eluser]Matrices[/eluser] Hey all, I just installed code igniter on my server and I came across an error when building out my homepage. It seems that base_url() isn't defined. I've used CI before on other projects and didn't have this problem. Can anyone shed some light on the situation? Code: <? creates: "Fatal error: Call to undefined function base_url() in /home/weirdmac/public_html/system/application/controllers/blog.php on line 12" base_url() error - El Forum - 09-27-2008 [eluser]Ihab Khattab[/eluser] I think you should first load url helper so you can use base_url() Code: <? or you can autoload it "so you don't need to load it every time you want to use it" from Quote:application/config/autoload.php Code: $autoload['helper'] = array('url'); base_url() error - El Forum - 09-27-2008 [eluser]Matrices[/eluser] that did it! Thank you very much |