Functions

In the above example the function name is index(). The "index" function is always loaded by default if the second segment of the URI is empty. Another way to show your "Hello World" message would be this:

example.com/index.php/blog/index/
 
The second segment of the URI determines which function in the controller gets called.
Let's try it. Add a new function to your controller:


Now load the following URL to see the comment function:

example.com/index.php/blog/comments/
 
You should see your new message.