Welcome Guest, Not a member yet? Register   Sign In
Problems using base_url
#1

[eluser]reyntjensw[/eluser]
Hi there,

I'm testing CI for the first time and I'm having some problems using the base_url().
The command isn't recognisedConfused

Here is my error :

Fatal error: Call to undefined function base_url() in /Users/reyntjensw/CI/CMS/system/application/views/page/index.php on line 3

This is the code I'm using:

<?php echo base_url();?>

This is the code from my config file:

$config['base_url'] = "http://localhost:8888/CMS/";

Could someone tell me what's wrong?

Thanks
#2

[eluser]Kyle Johnson[/eluser]
Verify that in the controller calling it you have the

$this->load->helper('url');

I ran into this problem today, I thought it was a base function.

I ended up putting the url helper into my autoload config file.
#3

[eluser]reyntjensw[/eluser]
Problem solved, thanks for thatSmile




Theme © iAndrew 2016 - Forum software by © MyBB