Welcome Guest, Not a member yet? Register   Sign In
base_url problem
#1

[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');
The result is:
Quote:http://localhost/
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?
#2

[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.
#3

[eluser]Aken[/eluser]
The speed difference between the two is incredibly minute. Shouldn't matter which you choose to use.




Theme © iAndrew 2016 - Forum software by © MyBB