In this tutorial i will show you how to solve base_url() function not working in codeigniter 3.
When i was starting to work on my codeigniter 3 project few days ago. I just followed to some tutorial from google. But when i used base_url() in codeigniter 3 project as explained in tutorial. After run project i found following error.
"Fatal error: Call to undefined function base_url()"
I was thinking, how to resolve this error because i simply download codeigniter 3 project from scratch and why this error for base_url(), So finally i found how to solve this error. We have to add "url" helper in autoload.php file.
If you also see this type of error then you can fix by only load url helper on followinf file:
$autoload['helper'] = array('url');
After adding above url helper, i solved my problem.
I hope you will get your best solution...
Do you like below Tutorials ?
- Laravel 5.5 validation example with custom message
- Laravel 5.5 create zip archive file and download example
- Laravel 5.5 Jquery Ajax Request Example From Scratch
- Laravel 5.5 pagination example from scratch
- Ajax CRUD example in Laravel 5.5 application
- Class Form not found in Laravel 5.5
- Laravel 7.x and 6.x get last query log example
- Laravel 5.5 Image Upload example