This can be done either in application/ config/ autoload. php ( on or around line 67) : $ autoload[ ' helper' ] = array( ' url' ) ;. Or, manually: $ this- > load- > helper( ' url' ) ;. You have to load the url helper to access that function. Either you add $ this- > load - > helper( ' url' ) ;. somewhere in your controller. Alternately, to have it be loaded automatically everywhere, make sure the line in. public function index( ) { $ this- > load- > helper( ' url' ) ; }. Second Example: Go to application / config / autoload. And add the url to here which I think is best for you. $ autoload[ ' helper' ] = array( ' url', ' file', ' form', ' text', ' html', ' date' ) ;. 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. It could be that your not echoing the base_ url.