menu

Codeigniter Controller


Codeigniter Controller is simply class name which contains methods inside it.


All the controllers are kept inside the application/controllers folder.

Codeigniter Controller Syntax

Lets start with a simple controller named as “Helloworld”.

Try it ยป

Note Class name must start with uppercase
example:

Not Like This :

Now visit your site as :

Or

If you have not removed the index.php from url

Note : Default function index() will be called

Which is :

Advertisements