Codeigniter - SPLessons

CodeIgniter Installation

Home > Lesson > Chapter 3
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

CodeIgniter Installation

Codeigniter Installation

shape Description

To use CodeIgniter, install Web Server (Apache), PHP and Database separately (LAMP – Linux-Apache-MySql-PHP) or use third part tools (eg: WAMP ) that can get all the three packages in one file. Once installed that file, it will configure all the settings and will be ready to run the PHP files. Below are some of the third party packages, which will install Web Server (Apache), PHP, MySQL. Below are the steps which shows how to download and install CodeIgniter.

shape Step-1

Download the CodeIgniter source code from official website as shown below.

shape Step-2

Extract the downloaded Zip file and rename the folder name and place in the Local server i.e Xampp/htdocs folder.

shape Step-3

See the selected folder. Go to application folder, here MVC structure like Controllers, Models and Views can be observed.

shape Step-4

Test whether CodeIgniter is properly installed or not.

HMVC installation with codeigniter

shape Step-1

Download CodeIgniter HMVC Files stored in github from GitHub or BitBucket as shown below.

shape Step-2

Copy core folder files of HMVC into codeigniter/application/core folder.

shape Step-3

Create MX folder under application/third-party and copy third-party folder files of HMVC into MX folder.

shape Step-4

Create Modules folder within application and start creating own modules each with a single controller in Controllers folder, model in Models folder and view in Views folder following MVC architecture. Thus both MVC and HMVC can be used with single directory structure. If wanted to use only HMVC, then move "application/controllers/Welcome.php to "application/modules/welcome/controllers/Welcome.php" and "application/views/welcome_message.php" to "application/modules/welcome/views/welcome_message.php".

Summary

shape Key Points

  • CodeIgniter  Installation involves Xampp Server and CodeIgniter.
  • CodeIgniter also works fine if installed HMVC.