Call to undefined function base_url() in CI 3.x version

Codeigniter updated their version time to time for upgrade its functionality and features. There are latest version is 3.x. I noticed that in installation process developers face a problem while use of base_url. Today I discuss how to fix Call to undefined function base_url() in 3.x version.

I get this error when I did not set URL helper in autoload.php (folder application/config). I share you solution for fix this error. find this code in autoload.php.

and replace with it

You can add this helper in direct controller’s constructor but this method work for only one controller so above is good one:


Thanks for visiting. Happy Learing 🙂


Add a Comment

Your email address will not be published. Required fields are marked *