3

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

http://localhost/project1/CodeIgniter_2.1.0/application/controllers/hello.php

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.

1

1 Answer 1

14

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

http://path/to/codeigniter/index.php/<controller>/<function>/<param>

So, in your case, it should be:

http://localhost/project1/CodeIgniter_2.1.0/index.php/hello

$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';

DOCS: http://codeigniter.com/user_guide/general/urls.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.