What Will I Learn?
- How to install CodeIgniter Framework
- You will learn How to Configure CI (CodeIgniter)
Requirements
- Xampp 7.0.1
- CodeIgniter 3.1.7
- Sublime
What is CodeIgniter ?
Framework is a collection of instructions collected in a function and class with a function to facilitate the developer in the call without having to write the same program syntax over and over again. Source code will look cleaner and more structured.
Codeigniter is a php framework that is open source and certainly free for every use, The purpose behind the development of a framework to facilitate the programmer in building a web-based applications. The method used is MVC (Model, View, Controller). Webserver Packages (AppServ, XAMPP, EasyPHP, WAMP, etc) & Code Igniter Codeigniter (CI) is a PHP framework, aimed at people who want to build websites using PHP. Using a view-controller-model architecture that separates the logic and display sections of the program, CI is quite "fun" to use. Not difficult especially you have mastered the basic principles of OOP in PHP.
The concept that separates every major component into 3 MVC components is
- Model is the intended part for processing or manipulation database.
- View is a part of the home screen at the page that will appear to the user.
- Controller is the final layer that there is a collection of instructions commands connecting model and view.
Difficulty
- Basic
STEP 1 : INSTALL FRAMEWORK
- The first step you must first download the file Codeigniter on its official web page, Here
- Extract the CodeIgniter.rar file you have downloaded into your web server's root directory, for example for example
C:\ Xampp\Htdocs\CodeIgniter
(for those using Xampp web server). Then go into application folder. Inside this application folder you will often change later and in the next model
- Run Xampp Control Panel then enable it on Apache and MySQL module. And if you try to run on a web browser then the page will appear as below.
STEP 2 : CONFIGURE CODEIGNITER
- Open the config.php by using text editor like Sublime, file located in the
C:\xampp\htdocs\CodeIgniter\application\config\config.php
, which is useful to begin configuring the CodeIgniter framework.
- Change the clean and dynamic url base on CodeIgniter, customize it to the location where your CodeIgniter folder resides on
C:\Xampp\Htdocs
.
For example: Your CI folder is in www / ci folder then change line
$ config ['base_url'] = "http://example.com/";
with
$ config ['base_url'] = "http://localhost/CodeIgniter/";
Because in this tutorial we will build CI in our local server. Localhost is the name for the local server that is on our computer, and basically the computer is the server, and the server is the computer.
- Then the next stage is setting up the database. Open the database.php file with applications like Sublime, Notepad++ and others, database.php configuration file located in
application/config/ database.php
Change hostname, username, password, and database name (later we will create a database, to temporarily make its name first) then adjust to your mysql settings. As an example :
$ db ['default'] ['hostname'] = "localhost";
$ db ['default'] ['username'] = "root";
$ db ['default'] ['password'] = "";
$ db ['default'] ['database'] = "db_ci";
- Done with installation and configuration, next post will release about prepare database which we will use in this Project.
CONCLUSION
- In the Database Configuration section used multidimensional array Because it is more simple and can store more than one connection configuration.
- The CodeIgniter framework also supports many types of databases eg MySQL, PostGre SQL, Oracle and many more.
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved because it does not follow the Utopian Rules.
simple on-screen instructions
, ubiquitous functions (Save, Open, Print, etc.) or basic programming concepts (variables, operators, loops, etc.) will not be accepted.You can contact us on Discord.
[utopian-moderator]
Okee thank