Codeigniter 3 - call to undefined function site_url() Fixed

November 23, 2017 | Category : Codeigniter PHP

If you are fetching issue with undefined function site_url() in your codeigniter 3 application then you have to load "url" helper on auto load.

I wanted to share this error, it will comes when you install fresh codeigniter 3 application and try to run, you will find this error undefined function site_url() when you use site_url() helper.

So, if you used site_url() helper then you need to load "url" helper, that will provide site_url(), bese_url() etc helper function. So you have to simple load "url" helper like as following.

application/config/autoload.php

.....

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

.....

After above line add, you will solved your issue defiantly.

I hope you found your best solution.. :) :)