Configuration in CodeIgniter


First we have to set the database connection:
  1. Opent the file application/config/database.php.
  2. $config['hostname'] = "localhost";

    $config['username'] = "myusername";

    $config['password'] = "mypassword";

    $config['database'] = "mydatabase";

    $config['dbdriver'] = "mysql";


  3. Then open application/config/config.php

    $config['base_url'] = 'http://localhost/codeigniter';

    $config['encryption_key'] = '1234';

    Note:For all process in CI it will look into the index.php as initial file

  4. Open application/config/autoload.php

    $autoload['libraries'] = array('session','database');

    and

    $autoload['helper'] = array('url','form');