In this example we will discuss about Hello world example CodeIgniter framework PHP.
We use two file for hello world example.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Hello extends CI_Controller {
public function index()
{
$this->load->view('hello_world');
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Hello World !</title>
</head>
</body>
<h1>Hello World !</h1>
</body>
</html>
Now run the program on your browser with the below URL:
http://localhost/CodeIgniter/index.php/Hello