CodeIgniter Forums
site_url removes part of string - 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: site_url removes part of string (/showthread.php?tid=6637)



site_url removes part of string - El Forum - 03-06-2008

[eluser]doors[/eluser]
I have something like this for my site_url in the config file:

http://www.example.com/catalog/

When I am using site_url function it gives the following string:

http://www.example.com

Why is that happening?


site_url removes part of string - El Forum - 03-06-2008

[eluser]Pygon[/eluser]
site_url is based off $config['base_url'] and doesn't contain any logic to strip anything off of it.


site_url removes part of string - El Forum - 03-06-2008

[eluser]Doosje[/eluser]
I think doors means somthing else.
site_url gives the url defined like Pygon said.
If you want it to point to something else try:
Code:
site_url('catelog');



site_url removes part of string - El Forum - 03-06-2008

[eluser]doors[/eluser]
Sorry guys. I was using base_url() instead of site_url().