Getting Started with CodeIgniter

CodeIgniter gives you the ability to write PHP code quickly and effectively while Twitter Bootstrap allows you to create interfaces quickly without needing to style primary elements. However, the two are not combined and certain things between CodeIgniter and Twitter Boostrap do not play nicely. With CodeIgniter Bootstrap, it allows you to skip this “combination” phase and have you start developing your idea instead of developing the common web elements.

Getting Started

Of course the first step is to download the codeigniter framework. You can download the latest stable version of codeigniter from the following url http://codeigniter.com/downloads/ . It will be a compressed file (zip file) whcih will be downloaded, just unzip it and keep it in a folder, say codeigniter. Make sure you keep it inside the htdocs or webserver’s directory.

Not its time to configure the codeigniter which initial settings to start working on. To do so, open the file config.php in to your favorite editor. The file resides inside system/application/config directory. You will see an array called $config which stores all the configuration information, we will change only the following values and leave the rest as it is.

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
*/
//don't forget the TRAILING slash (/)
$config['base_url']	= "http://localhost/codeigniter/";

Trust me, that shall be all to get you started. Some blogs/sites have show much changes in this file, but you can play around with them when needed. You can change a lot about your application form this single file. Like you can store the session information inside a database, by simple setting up the config var $config[‘sess_use_database’] as TRUE, which is FALSE by default. You can also change the name of the session table from default “ci_sessions” to anything you like.