[Solved]Fatal error: Call to undefined function base_url() in Codeigniter

[Solved]Fatal error: Call to undefined function base_url() in Codeigniter

In this post, I will let you know how to fix the issue "Call to undefined function base_url()" in Codeigniter.

When i was started with Codeigniter then i had faced some fatal error like this :

Call to undefined function base_url() in C:\wamp\www\Demo-CI\application\views\\products\list.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 :


Phone: (+91) 8800417876
Noida, 201301
sakarya escort sakarya escort bayan sakarya escort serdivan escort sakarya escort sakarya escort serdivan escort
karasu escort akyazı escort serdivan escort akyazı escort ferizli escort sapanca escort serdivan escort söğütlü escort sakarya escort izmit escort arifiye escort erenler escort hendek escort kocaali escort pamukova escort taraklı escort geyve escort