2. What is CodeIgniter?
CodeIgniter is a PHP MVC framework for developing applications rapidly.
CodeIgniter provides out of the box libraries for connecting to the database
and performing various operations. Like sending emails, uploading files,
managing sessions, etc.
3. How CodeIgniter work?
CodeIgniter is an MVC framework. MVC stands for Model View Controller.
When a user requests a resource, the controller responds first. The controller
understands the user request then request the necessary data if necessary.
4. CodeIgniter Release History
2006 First version of CodeIgniter
2009 ExpressionEngine 2.0 launched
2014 British Columbia Institute of Technology took
ownership of the project
2019 Stable version 4 expected to launch
5. Why Use CodeIgniter
Model-View-Controller Based System
Extremely Light Weight
Query Builder Database Support
Form and Data Validation
Security and XSS Filtering
Session Management
etc,
6. CodeIgniter MVC Framework
Model – representation of the data
View – rendering of the data suitable for interaction with the user
Controller – that passes model data to the view and vice versa
This separation of concerns allows for greater flexibility, reuse of code, and overall
preservation of the developer’s sanity.
7. Model (MVC)
A class containing one or more related methods (Custom PHP Functions)
Typical Uses:
Create
Read
Update
Delete
8. View (MVC)
Code that display information to the user
Views can be:
Web pages with PHP code snippets inserted
Web pages with forms to gather user input
Other outputs(CSV, PDF, etc..)
9. Controller (MVC)
A class containing one or more related methods (Custom PHP Functions)
Typical uses:
Request a set of data from the model by sending arguments
Send a payload of data to a view (web page)
Receive a data payload from a view
Pass data to the model for inclusion in a database
10. CodeIgniter Security features
URI Security
CodeIgniter is fairly restrictive regarding which characters it allows in your URI strings in order to help
minimize the possibility that malicious data can be passed to your application.
XSS Filtering
CodeIgniter comes with a Cross Site Scripting filter. This filter looks for commonly used techniques to
embed malicious JavaScript into your data, or other types of code that attempt to hijack cookies or do
other malicious things.
Password handling
DO NOT use weak or broken hashing algorithms like MD5 or SHA1.
DO NOT store passwords in plain-text format.
11. Advantages of CodeIgniter
1. Easy to learn,
2. Easy handling and customizing.
3. Good collection of possessed libraries.
4. Offers flexibility and easy management With MVC based framework.
12. Disadvantages of CodeIgniter
1. Its PHP based only and not very object-oriented in some parts
2. PHP4 legacy code,
3. Irregular releases,
13. Installation Instructions
CodeIgniter is installed in four steps:
Unzip the package.
Upload the CodeIgniter folders and files to your server. Normally the index.php file will
be at your root.
Open the application/config/config.php file with a text editor and set your base URL. If
you intend to use encryption or sessions, set your encryption key.
If you intend to use a database, open the application/config/database.php file with a
text editor and set your database settings.
14. CodeIgniter Directory Structure
The image given below shows the directory structure of the CodeIgniter.
CodeIgniter directory structure is divided into 3 folders,
Application
System
User_guide
15. Application Contain
Cache, config, controller, core, helpers, hooks, language, libraries, logs, models, third_party,
Views
System Contain
Core, database, fonts, helpers, language, libraries
User_guide
This file serves as a reference guide for you when you want to understand the CodeIgniter
API. You should not upload this directory when deploying your application.