-->



Friday, October 9, 2015

Codeigniter--Configuring Files

After Installation Concept, We will be learning about how to Configure Codeigniter files.

The Codeigniter Framework can't be used as it. Because the files in the Codeigniter folder must be configured and its a mandatory. So in this tutorial, we are going to learn about configuring the files.

1. Go to C:\xampp\htdocs\yourCIfolder\application\config and select autoload.php. In this file, you will find $autoload['libraries'] = array();. libraries like xmlrpc, database, and session are to be loaded in it.

autoload.php


2. In the same autoload.php  file, you will find $autoload['helper'] = array();.  Helpers like url, file, and form should be included.

autoload.php
  
3. Again in autoload.php, you will find $autoload['model'] = array();. Files with models(eg. file_model.php) will be included in it.

autoload.php
4.  In the same config folder, you will find another file named config.php.  When you scroll down, you will find $config['encryption_key'] = '';. When you are using the session and Encryption in your autoload.php, you should also use encryption_key for it.You can give either alphabets or numbers even special characters as keys.

  
config.php


5.  These are the basic libraries and helpers that are to be used before working in Codeigniter. Apart from these two files, there are database.php and routes.php which we will learn in the following tutorials. 
    
 In the next tutorial, we will be developing a simple application. 

No comments:

Post a Comment