Firstly, before we begin the installation process, it's important to ensure that your server meets the minimum system requirements for CodeIgniter 3.
Download CodeIgniter
The first step in setting up CodeIgniter is to download it from the official website. You can download the latest version of CodeIgniter from the following URL:
https://codeigniter.com/userguide3/installation/downloads.html
Extract the Files
Once you have downloaded CodeIgniter 3, you need to extract the files to your local machine in particular folder
Default Controller Welcome.php
Create a Database
Next, you need to create a database for your CodeIgniter application. You can use a tool like phpMyAdmin to create the database from the following URL:
http://localhost/phpmyadmin
Configure the Database
After you have created the database, you need to configure CodeIgniter 3 to use it. Open the application/config/database.php file and enter the database details.
Set up Your Config
By default, CodeIgniter uses a query string URL structure. If you want to use a different URL structure, you can modify the config.php file located in the application/config directory.
Create New Controller
To create a new controller in CodeIgniter, create a new PHP file in the "application/controllers" directory and define your class with the appropriate naming convention. For example, to create a controller for a blog, you could create a file named "Blog.php" and define a class named "Blog" that extends the "CI_Controller" class.
application/controllers/Home.php
Create New View
CodeIgniter also provides a template engine called "View" to help you build dynamic web pages. You can create a new view file in the "application/views" directory and load it from your controller using the "load->view()" method.
application/views/home_view.php
Modify Your routes
you can modify the routes you need to change default controller welcome to Home
http://localhost/codeigniter/CodeIgniter-3.1.13/
Conclusion
In conclusion, installing and setting up CodeIgniter is a straightforward process. By following the steps outlined in this article, you can quickly set up CodeIgniter on your server and start developing web applications. We hope this article has been informative and helpful.
0 Comments