Tutorial CI-01: How To Configure of CodeIgniter

in #utopian-io7 years ago (edited)

Codeigniter Cover.jpg

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

  1. Model is the intended part for processing or manipulation database.
  2. View is a part of the home screen at the page that will appear to the user.
  3. 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

CI1.jpg

  • 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

CI2.jpg

  • 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.

CI3.jpg

CI4.jpg

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.

CI5.jpg

  • 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";

CI7.jpg

  • 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

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

  • Tutorials must be technical instructions that teach non-trivial aspects of an Open Source project.
  • Design or video editing related tutorials, gameplay, simple on-screen instructions, ubiquitous functions (Save, Open, Print, etc.) or basic programming concepts (variables, operators, loops, etc.) will not be accepted.
  • Tutorials about installation of frameworks don't really teach technical aspects about open source projects. They are also considered too simple to be approved.

You can contact us on Discord.
[utopian-moderator]

Okee thank

Coin Marketplace

STEEM 0.24
TRX 0.26
JST 0.041
BTC 98102.63
ETH 3490.00
USDT 1.00
SBD 3.42