CodeIgniter Helloworld Application

In this tutorial you will learn about the CodeIgniter Helloworld Application and its application with practical example.

CodeIgniter Hello World Application

The “Hello world!” application is a simplest application that will display some text on the screen. The “Hello world!” application is simple yet complete application for beginners to understand basic syntax and working of codeigniter MVC framework.

Prerequisites

Before starting with this tutorial I assume that you already have a CodeIgniter application installed and configured (removed index.php from url), in my example I have installed and configured it as –

http://localhost/codeigniter/

installation2

Step 1:- Lets start be making a basic controller class file. Create a new file in the ‘controllers’ directory and name it ‘hello.php’.

Step 2:- Put the following code snippet in this controller class –

Step 3:- Now, create a new file in the ‘views’ directory and name it ‘hello_world.php’.

Step 4:- Put the following code snippet in ‘hello_world.php’.

Step 5:- Now open the following URL in the browser to see the output –

http://localhost/codeigniter/hello

Output :-

hello-world

In this tutorial we have learn about the CodeIgniter Helloworld Application and its application with practical example. I hope you will like this tutorial.