base_url($uri = '', $protocol = NULL)
Parameters:
$uri (string) – URI string
$protocol (string) – Protocol, e.g. ‘http’ or ‘https’ Returns:
Base URL Return type:
string
Returns your site base URL, as specified in your config file. Example:
echo base_url();
This function returns the same thing as site_url(), without the index_page or url_suffix being appended.
Also like site_url(), you can supply segments as a string or an array. Here is a string example:
echo base_url("blog/post/1