Codeigniter Hello World
Let’s make a new Controller in our project that will display our Hello World string when this controller url is requested by browser.
Example (application/controllers/Hello.php)
<?php class Hello extends CI_Controller { public function index() { echo "Hello World!"; } }
Output
Here index() method is loaded by default when Hello controller url is called.