CodeIgniter Framework

Post on 08-Jun-2015

269 views 0 download

Tags:

Transcript of CodeIgniter Framework

Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd

Niyaz

Kannancheryniyazofficial@gmail.com

tweetboy

Niyazsky

+91 9746 049 048

in/niyazsky

Intro of CodeIgniter

CodeIgniter (CI) is one of popular php framework. If you are already building PHP Application, CodeIgniter will help you to do it better and more easily. With CodeIgniter, you can save time, make your web more robust, your code will be easier to read and maintenance. It is free, lightweight, and simple to install..

With CodeIgniter, you can cut down the amount of code you need to type. This is not just good for lazy, but: less type, fewer mistake, and less time for spend debugging.

ModelViewController

CI Database Configuration

Search Google CodeIgniter or http://ellislab.com/codeigniter | Copy to Server

Change Default Controller | Config->routers -> Default Controller

Calling a Function to load | $this->functionname();

Models

Model -------<?php

class Math extends CI_Model{

public function add(){

return 1+1}}

Controller---------

public function addStuff(){

$this->load->model("math");$this->math->add();

}

$this->addStuff();

How to Pass to Views

Controller View

Data Passing to MVC [1/3]

Controller

Data Passing to MVC [2/3]

Model

Data Passing to MVC [3/3]

View

URLs |mod_rewrite | URIs s

Create file .htaccess | Open and Correct Rewrite Base

Check rewrite module is on in Local Apache Server

Last Open -> Config Folder -> Config-> remove index.php

https://github.com/EllisLab/CodeIgniter/wiki/Removing-index.php-in-codeigniter-xampp-for-windows

Connecting DataBase

Open -> Config Folder -> autoload->

Create the Database

Open database.php within CodeIgniter\system\application\config. Set config like below:

Get Value from Database [1/3]

Controller

Get Value from Database [2/3]

Model

Get Value from Database [3/3]

View

Insert Value in Database [1/2]

Controller

OR

Insert Value in Database [2/2]

Model

OR

Update Value in Database [1/2]

Controller

OR

Update Value in Database [2/2]

Model

OR

Delete Value from Database [1/2]

Controller

Delete Value from Database [2/2]

Model

QUESTIONS SECTION

If this presentation helped you, please visit our page facebook.com/baabtra and like it.

Thanks in advance.

www.baabtra.com | www.massbaab.com |www.baabte.com