base_url problem |
[eluser]victorche[/eluser]
I've autoloaded the url helper and I am trying this in a controller: Code: echo base_url() . '<br />' . $this->config->item('base_url'); Quote:http://localhost/My first question is... why there is a difference? I thought those should return the same. And my second question is... which one is faster?
[eluser]Mr. Pickle[/eluser]
The base url set in the config should be WITH a trailing slash. Don't know what you've set there? If the trailing slash is missing there, I think somewhereit's is added by the system somewhere.
[eluser]Aken[/eluser]
The speed difference between the two is incredibly minute. Shouldn't matter which you choose to use. |
Welcome Guest, Not a member yet? Register Sign In |