Monday, August 25, 2014

"HelloWorld" program in PHP CodeIgniter

   No comments     
categories: 
Its really simple and i'll show you the steps.

Step 1:- download the CodeIgniter framework form the following link “http://ellislab.com/codeigniter/download”.



and extract it into “C:/xampp/htdocs/” rename the folder as "codeignter". open a browser and type "http://localhost/codeigniter", you will get following.


















Step 2:- open a notepad or any other editor and write the following program .

 <?php
class HelloWorld extends CI_Controller
{
    function index()
    {
        echo "Hello World";
    }
}
?>

 After writing the above program save it to “C: /xammp/htdocs/codeigniter/application/controllers” as “HelloWorld.php”. And now type “http://localhost/codeigniter/index.php/HelloWorld” you will get output as “Hello World” like following.



0 comments:

Post a Comment