Reputation: 49
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.
Upvotes: 3
Views: 32218
Reputation: 227310
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
Upvotes: 14