We know that the majority of developers are leaving PHP and choosing Python or JS as their language to develop applications. But we can not neglect the popularity of PHP websites. WordPress CMS, Laravel frameworks etc. made php an irresistible language in the development field. CodeIgniter on the beautiful PHP framework also have a big role in holding PHP. CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications. It is much simpler and easier than Laravel.
Now we are going to install and set up a CodeIgniter application on Windows 10 platform.
1. INSTALL XAMPP
XAMPP is the most popular PHP development environment.XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
XAMPP can be easily installed using the below URL.
Just install the latest version (7.2.9) from the list. It is to be noted that only 32-bit version is available for Windows platform, but it works fine in 64 bit Windows.
Now you will get a XAMPP exe file on Downloads directory. Install this application by double-clicking it (Neglect the warnings by Windows). I have shown the screenshots of the installation steps below.
2. DOWNLOAD CODEIGNITER
After setting up XAMPP and running Apache & MySql in it, we have to download the CodeIgniter zip file from the official website.
We will get a zip file. Just move this file to C:\xampp\htdocs and extract the zip file from here.
Now enter CodeIgniter-3.1.10. There contains another folder with the name CodeIgniter-3.1.10. We can rename this to our project name “my-code-igniter-app“.
3.SETTING UP DATABASE
You have to create a database on your Mysql server which is the DB of your CodeIgniter application.
- Direct to the URL below.
Enter username and password(As a default, the username and password will be root or both will be blank).
- Click on the New tab
- Enter a database name
Now from your project directory, direct to application/config/database.php
Here we have to add our database details created earlier.
4.RUNNING OUR APPLICATION
Now we can run our application on our browser using the link below
This will return a view as below.
Have a nice code !