![]() |
url helper not loading - 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: url helper not loading (/showthread.php?tid=23102) |
url helper not loading - El Forum - 09-30-2009 [eluser]richzilla[/eluser] Has anybody else had this problem? the url helper seems not to be loading, ive autoloaded it however on the first call to the Code: base_url() Code: A PHP Error was encountered As far as i can see, ive loaded everything as i normally do, yet it seems not to like the url helper. The rest of my code: View: Code: <div class="container_12"> and the line from the autoload file: Code: $autoload['helper'] = array('date','url','file','typography'); Any help would be appreciated Cheers url helper not loading - El Forum - 09-30-2009 [eluser]n0xie[/eluser] [quote author="ricardino" date="1254337131"] Code: Message: Use of undefined constant base_url - assumed 'base_url' Your error is in global/header.php not in the view. Do you include it? If you echo the base_url() in a controller, does it work? (I'm betting it does...) url helper not loading - El Forum - 09-30-2009 [eluser]richzilla[/eluser] Very odd, it does work directly from the controller. global/header.php is the view file, as far as i understood it once id autoloaded a library or helper it was available to any file in the application? url helper not loading - El Forum - 09-30-2009 [eluser]n0xie[/eluser] [quote author="ricardino" date="1254338191"] global/header.php is the view file[/quote] It says it has an error with 'base_urlassets/css/reset.css" />'. Nowhere in the view file you supplied is there a mention of assets/css/reset.css ergo you are probably either showing us the wrong view, or are editing the wrong file url helper not loading - El Forum - 09-30-2009 [eluser]richzilla[/eluser] Apologies, helps if i post the whole thing: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> url helper not loading - El Forum - 09-30-2009 [eluser]n0xie[/eluser] Replace base_url for base_url(). It's not a constant but a function. url helper not loading - El Forum - 09-30-2009 [eluser]richzilla[/eluser] Fantastic thanks for the help. Its amazing the mistakes you manage to miss yourself. cheers |