You have to load the url helper to access that function. Either you add
$this->load->helper('url');
somewhere in your controller, or you can put it into the application/config/autoload.php to be loaded automatically everywhere.
By Rinky Kandwal
$this->load->helper('url');
EmoticonEmoticon