Wednesday, April 27, 2016

[Codeigniter] Call to undefined function base_url()

base_url() in a function in Url helper , please check have you loaded it before you use.
$this->load->helper('url');
for example, load that for specified function :


Or load for all functions in controllers :

Or you can load that to you whole website, load globally. just edit application/config/autoload.php and add 'url' as one of the value of $autoload['helper']:

$autoload['helper'] = array('url');



Reference:
http://stackoverflow.com/questions/11581636/fatal-error-call-to-undefined-function-base-url-in-c-wamp-www-test-ci-applic

No comments :

Post a Comment