Difference between base_url (); and base_url ('assets / example');

3

What would be the difference between them? Because in my project I used both and could not identify the difference.

    
asked by anonymous 27.04.2018 / 01:15

1 answer

5

Very simple, base_url () in codeigniter returns the base url, let's say your site is: link vc calling base_url () function will return this.

If you pass the parameter, it will return the base + parameter, eg: let's say you want to access an article from your blog.

echo base_url("blog/post/123");

link

For more information, visit link

    
27.04.2018 / 15:34