Installing Codeigniter Tutorial For Beginners
Codeigniter is loosely based MVC (Modal View Controller) framework with a very little footprint and allows flexible php coding so it is very easy to learn too. Codeigniter has a very rich library which allows you to add more features with less coding. Once you start with codeigniter you will find it very easy to learn and explore, though knowledge of PHP is compulsory as the framework is completely based on PHP.
Tiers of codeigniter
Codeigniter has three main tiers namely Model/View/Controller this approach of codeigniter allows to keep the application logic separate and organized.
Model: Models contains all logics of your application and it communicates with data sources like database queries.
View: View contains all your page designs, view is basically the HTML codes of your application with some PHP codes to display response or requests.
Controller: This is heart of codeigniter, a controller connects Models Views and other aspects of your application with each other and works as mediator.
How to Install Codeigniter
For installing Codeigniter you need a PHP server environment and Mysql running, there are many third party integrations available for Windows, Linux and Mac which allows let you run a local server in your personal computer itself, or you can buy a hosting space for your project and work on remote server. I have WAMP package running on my computer which allows me to let run my PHP projects on my local machine and create them locally. WAMP stands for “Windows Apache MySql and PHP” it can be downloaded from http://www.wampserver.com/en/. Next you can download the codeigniter framework from https://www.codeigniter.com/
Once you have installed WAMP server or your php server please start the server. Now extract the files you downloaded from codeigniter website and create a project directory inside the root directory of your server. For WAMP the root directory is located at : c:/wamp/www, copy all extracted files of codeigniter inside the directory you newly created.
Codeigniter files look like this:
Testing Codeigniter Install
If you have installed codeigniter successfully, try visiting your codeigniter installation URL ie. For me it is http://localhost/codeigniter/, you will see the following output
Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you’ll find it located at:
The corresponding controller for this page is found at:
This means that you have successfully installed codeigniter and you are ready to move to next chapter: