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.6 - Collection could not be converted to int
- Laravel - How to generate secure https URL from route?
- Laravel - Vue JS File Upload Example
- How to get last 7 days data in Laravel?
- Laravel Validation required if other field empty example
- Laravel Eloquent - When Case Statement in Select Query Example