CodeIgniter Forums
base_url is not available - 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: base_url is not available (/showthread.php?tid=43679)



base_url is not available - El Forum - 07-20-2011

[eluser]nasir031[/eluser]
The problem that I'm facing is, echo site_url()/ base_url is not accessible in my index.php even though I've auto loaded $autoload['helper'] = array('url');. what is the problem here... I'm unable to get it.
Please Help I'll be thankful to you people


base_url is not available - El Forum - 07-20-2011

[eluser]Bart v B[/eluser]
Some code would be more helpfull to see what the problem is causing.


base_url is not available - El Forum - 07-20-2011

[eluser]marcogmonteiro[/eluser]
should be base_url() and not just base_url I think...


base_url is not available - El Forum - 07-20-2011

[eluser]danmontgomery[/eluser]
index.php is the very first code executed by CI, the loader hasn't happened yet, so base_url()/site_url() aren't going to be available.


base_url is not available - El Forum - 07-20-2011

[eluser]marcogmonteiro[/eluser]
@noctrum lol when @nasir031 said index.php I assumed he was talking about the default controller or something like that. Didn't even occurred to me that option lol