Codeigniter – Getting Codeigniter to work on localhost with xampp


I have Netbeans, Codeigniter, and xampp setup on a Windows 7 machine and I am simply trying to call up a simple object to display hello world.

I keep getting the Object not found error after exhausting many tutorials. When I run my script it uses the following url


So xampp is working fine when I call up localhost/xampp from my browser although im not sure what else needs to be configured.

I've tried many different base urls although currently my config.php has it set as follows $config['base_url'] = '';

I'm a newbie just trying to get things setup so I can start working on projects but can't get past this for days.

Best Solution

That's not how CodeIgniter URLs work. It should be:


So, in your case, it should be:


$config['base_url'] should be set to the index.php, so it should be:

$config['base_url'] = 'http://localhost/project1/CodeIgniter_2.1.0/index.php';


Related Question