Posted inProgramming / Codeigniter

Codeigniter MVC Tutorial Hello World

Codeigniter MVC Tutorial Hello World

Today, We want to share with you Codeigniter MVC Tutorial Hello World.
In this post we will show you Codeigniter Tutorial Hello World Example – Steps By Step, hear for CodeIgniter Tutorial for Beginners we will give you demo and example for implement.
In this post, we will learn about Hello world program in php codeignter, CodeIgniter mvc example with an example.

CodeIgniter is an Open Source Framework based on php,
Which can be used Easly Web Based Application.
It is Model-View-Controller (MVC) Based System and also Light Weight.
Secure and session Manegemne very easy.

Routing Easly Understand in CodeIgniter(CI) Framework.

You should have knowladge of

1) core PHP
2) MVC
3) HTML
4) CSS
5) MYSQL

Basic Environment setup

1) Xampp Server (Any Server).

Download link in Download Xampp Server

https://www.apachefriends.org/download.html //Lates version

2) Any One Editor (Notepad++).

Download link in Download Notepad++.

https://notepad-plus-plus.org/download/v6.9.2.html //Free Download Notepad++ version(Latest)

3) Download CodeIgniter Framework

Download link in Download CodeIgniter

https://codeigniter.com/download //Free Download CodeIgniter 2.x

Steps of the CodeIgniter Framework.

phase 1: Fisrt call index.php
phase 2: And then call Routing
phase 3: And then check Security
phase 4: call to Controller
phase 5: controller call to (include Model,include Libraries,include Helpers,include plugins,include Scripts)
phase 6: Fetch Data in view side in CodeIgniter
phase 7: view Caching data and index.php

Step 1:

Fisrt of all open a htdoc folder

and then inside your open config.php file

Your Application name and Application and config.php

Go to config.php change


setpup file(OLD File)
$config['base_url'] = '';

TO

New File(changes Application -> config.php)

$config['base_url'] = 'http://localhost/Your-Application-name';

Step 2:

Now
create a New Controller Name

Your Application name->application -> Controller

helloworld.php
———————



class Helloworld extends CI_Controller {

 public function __construct() { //This is a __construct initial
 parent::__construct();
 }

 public function index(){ // This is a function call in controller
 $this->load->view('helloworld_codeigniter'); 
 }
}


Step 3:

And Then a make view side->
Create a helloworld_codeigniter.php file

within save path.

application and views and helloworld_codeigniter.php.


Hello World Application in CodeIgniter

Step By step CodeIgniter Example (Hello world.! in CodeIgniter).

Step 4:

and then goto your application

Application_name-> config ->routes.php.

Onchange in this file -> routes.php


$route['default_controller'] = "helloworld";

Step 5 :

Last Step Now Open Your Xampp Control panel and start to mysql and apache.

run in browser : localhost/Your-Application(codeigniter)-name/helloworld

Output Your Example:

Simple Hello World! Application Using CodeIgniter

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype