Welcome Guest, Not a member yet? Register   Sign In
base_url() doesn't show, weird @[email protected]

I installed a new CodeIgniter into my site.

I already configured the config.php
$config['base_url'] = 'http://sample.com/adminpro/';

And below is my controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Front extends MY_Controller

    function __construct ()


public function index()
        echo 'Front controller';
    //$this->load->view('welcome_message', $this->data);

public function hello()
  echo '<br>Hello World!<br>';
  echo base_url();

But when I call http://sample.com/adminpro/front/hello/

It doesn't display the base_url(), any help.



Did you load the URL helper? Do you have error displaying turned off?

you have to include the URL helper in the autoload config file

Yeah I think I forgot to include the URL helper.
Thanks for reminding me guys.
I will try.

Theme © iAndrew 2016 - Forum software by © MyBB