Reputation: 45
I uploaded CodeIgniter in my server, and the basic page works fine. Then I added home.php file in application/controllers folder with class Hello and function one, and tried to open the link url/index.php/Hello/one but I get the codeIgniter error that the page isn't found. What can I be missing?
Upvotes: 1
Views: 82
Reputation: 885
To fix your issue you should rename the Hello class to Home then go to URL/index.php/home/one
I recommend that you read up on the controller documentation:
http://ellislab.com/codeigniter/user-guide/general/controllers.html
A Controller is simply a class file that is named in a way that can be associated with a URI.
Consider this URI: example.com/index.php/blog/
In the above example, CodeIgniter would attempt to find a controller named blog.php and load it.
When a controller's name matches the first segment of a URI, it will be loaded.
Upvotes: 1