-->



Saturday, October 10, 2015

Codeigniter-Simple Application

After Configuring the files, We are all set to develop a simple application.


 The simple application is displaying "Hello World!!".It sounds funny, but to display these two            words in Codeigniter we are going to use View and Controller.So lets proceed with the tutorial.

1. Now go to your Codeigniter application folder and change the name of the folder as projectigniter     and  go to C:\xampp\htdocs\projectigniter\application\config and click on routes.php  and  make    the following changes.

                   $route['default_controller'] = "";   
                    as    
                   $route['default_controller'] = "hello_controller";

2. Include "url" in autoload.php in the helper.
 
                   $autoload['helper'] = array('url');

3. Now create a page hello_contoller.php within \xampp\htdocs\projectigniter\application\controllers.
4. Just copy and paste the code given bellow.
   
                                  hello_controller.php                                                                                          
         

5. Next create a page words_view.php within \xampp\htdocs\projectigniter\application\controllers.
6. Copy and paste the words given bellow.

                                      words_view.php

              

7. Now the application in your browser as http://localhost/projectigniter/.
8. You should get the screen as below.

     
 


That's all!!, We have successfully developed  our first and simple application.In our next tutorial we will be learning about google Recaptcha-login form.

No comments:

Post a Comment