How to Install and Configure CodeIgniter

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 based on MVC (Model-View_Controller)

.

It contains libraries, simple interface and logical structure to access these libraries, plug-ins, helpers and some other resources which solve the complex functions of PHP more easily maintaining a high performance. It simplifies the PHP code and brings out a fully interactive, dynamic website at a much shorter time. It supports PHP version of 5.2.6 or newer and MySQL version 4.1 or newer. It makes your web more robust and your code easier to read and maintain. It is a free toolkit, light weight and easier to install.

It reduce the development time as well as line of code codeigniter is also open source like php download and use it download it from direct official site of codeigniter ,the current version of it is 3.1.6.

Codeigniter Installation 

Download it from direct official site of codeigniter in zip format extract it in destination folder(xampp/htdocs if you are using xampp) and run it on your browser localhost/codeigniter_folder_name.

Codeigniter Configuration

for any project concept implementation on codeigniter must have configure the things like base url(domain name),database and index page etc.for set up base url goto to the config folder under application under codeigniter folder (C:\\xampp\htdocs\CodeIgniter-3.1.6\application\config) and open config.php and put the base_url path . base_url nothing but you domain name in local it is localhost/project_folder_name

$config['base_url'] = 'http://localhost/CodeIgniter-3.1.6/';// CodeIgniter-3.1.6 is a project folder name

Configure database accreditation in database.php file under config folder

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
	'dsn'	=> '',
	'hostname' => 'localhost',//database server name
	'username' => 'root',  // database user name
	'password' => '',     // database password
	'database' => 'test_db', // project database name
	'dbdriver' => 'mysqli',
	'dbprefix' => '',
	'pconnect' => FALSE,
	'db_debug' => (ENVIRONMENT !== 'production'),
	'cache_on' => FALSE,
	'cachedir' => '',
	'char_set' => 'utf8',
	'dbcollat' => 'utf8_general_ci',
	'swap_pre' => '',
	'encrypt' => FALSE,
	'compress' => FALSE,
	'stricton' => FALSE,
	'failover' => array(),
	'save_queries' => TRUE

15 Replies to “How to Install and Configure CodeIgniter”

  1. Excellent post. I was checking continuously this blog and I’m impressed! Extremely useful information specially the last part cgdbeefekeed

  2. Hi there! I just wanted to ask if you ever have
    any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no back up.
    Do you have any methods to prevent hackers?

  3. I was recommended this blog by my cousin. I am not sure whether
    this post is written by him as no one else know such detailed about my difficulty.
    You are wonderful! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *