CodeIgniter Tutorial – Simple and Easy Learning

CodeIgniter is a an Open source light weight framework .It is used for rapid development of dynamic website in PHP . CodeIgniter is based on the structure of MVC (Model View Controller).

CodeIgniter is a web application development framework. Controller Classes are most essential and necessary part of development where is model and view are optional one. CodeIgniter is a open source web development framework ,it mean that You don’t need to pay anything to use this MVC.

First program in CodeIgniter

When we finish downloading CodeIgniter we put codeigniter with project name as citutorial here. Once you downloaded CodeIgniter you well get this type of structure of its file.

CodeIgniter Project Structure
CodeIgniter Project Structure – PHP Cluster

1) First of all we work on controller file and create hello.php controller file

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Hello extends CI_Controller {
	public function index()      // default Method
		$this->load->view('your_view');    //// load the your_view.php view

2) Just configure for root folder of your project

$config['base_url']	= 'http://localhost/citutorial/';    //set for project root path

3) Just create a view file under application/view/your_view.php. This file will create a view for user.

<!DOCTYPE html>
<html lang="en">
	<meta charset="utf-8">
	<title>Welcome to CodeIgniter</title>


<div id="container">
	<h1>Welcome to CodeIgniter!</h1>

	<div id="body">
		<p>Hello World</p>

		<h3> CodeIgniter Tutorial presented by PHP Cluster</h3>



4) Access your codeigniter project with this url and get a view .Just create your first program in CodeIgniter and enjoy MVC framework coding.

CodeIgniter Tutorial
CodeIgniter Tutorial – PHP Cluster

Leave a Reply

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