As I have read in some resources, base_url() and site_url() functions in codeigniter are almost the same, although my version of code
I would like to add when to use base_url() and the site_url() . Basically one can use site_url() while creating links for controllers whereas base_url() can be used where we need to create urls for the assets like loading a css or js file or some image .
What I always prefer is to use site_url() for creating links to controllers or ajax urls and base_url() for loading assets .