CodeIgniter is PHP web development framework. This framework has modular approach, so we can use inbuilt libraries and helpers to make client’s project simple and easy. In this article, our expert developers guide you on how to install and configure CodeIgniter framework. Follow these step by step instructions to install this framework on your local computer.
- Download framework : Go to the website CodeIgniter and download the latest version 3.1.0 at your target location in desktop.
- Install and Explore : Unzip the downloaded package. Rename the folder as your project name and copy it to your localhost server. There are three well known PHP web development environment – WAMP (Windows, Apache, MySQL, PHP) or LAMP (Linux, Apache, MySQL, PHP) or XAMPP (Apache, MariaDB, PHP, Perl). We use WAMP. So we continue this installation and configuration process regarding WAMP. Copy your CodeIgniter folder and paste it to “C:\wamp\www”
- Config : Setup the right base URL of your project. Open config.php file from the following URL.
C:/wamp/www/codeigniter/application/config/config.php. Now, search “base_url” tag and edit this tag which point to you server and configuration folder.
- Find this code in config.php file : $config[‘base_url’] = “http://localhost/CodeIgniter/”;
- Test the path : Here is the quick test to check that the CodeIgniter application runs properly or not. Write this thing in your browser : http://localhost/codeigniter and you will get the following output.
- If you get the above output, than it means the path you set is working properly.
- Database configuration : There is a file, named database.php in config folder to connect database with CodeIgniter. The path of this file is : C:/wamp/www/CodeIgniter/application/config/database.php
- Change the code : To set the database connectivity, you will need to do following changes
Benefits of CodeIgniter :
- Simple, quick and user friendly coding in PHP.
- Excellent framework to learn more about how PHP works on your code.
- Folder structure is linear and easy to use.
- CodeIgniter allows you to construct your own cleaner URL lines.
- Customize and Configure source code as per you need.
Once you start coding with CodeIgniter, you will find yourself quickly adjusting with its methodology. It seems like you are familiar with PHP. Before going to start working with CodeIgniter, you should have basic knowledge of how PHP interacts with database and HTML except knowing basic syntax of PHP language. If you understand the basics of PHP framework development company, you will quickly build blogs, CMS (Content Management System), forums and any high interactive web applications.