syntax for using base url function codeigniter code example
Example 1: codeigniter base_url
$this->load->helper('url');
Example 2: dynamic base url codeigniter
defined('BASE_URL') OR define('BASE_URL', (is_https() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) . '/');
$config['base_url'] = BASE_URL;