[Solved]Fatal error: Call to undefined function base_url() in Codeigniter
In this post we will give you information about [Solved]Fatal error: Call to undefined function base_url() in Codeigniter. Hear we will give you detail about [Solved]Fatal error: Call to undefined function base_url() in CodeigniterAnd how to use it also give you demo for it if it is necessary.
Call to undefined function base_url() in C:wampwwwDemo-CIapplicationviews\productslist.php on line 5
I was getting an error because I did not load the url helper to access that function.
I put url in autoload file and you will find the autoload.php
in following path application/config/autoload.php.
$autoload['helper'] = array('url');
Save your autoload.php file and run your application, base_url()
function will work now.
Alternately, you can add following line of code somewhere in controller :
$this->load->helper('url');
Example : call to undefined function base_url()
Hope this code and post will helped you for implement [Solved]Fatal error: Call to undefined function base_url() in Codeigniter. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs.