How to setup CodeIgniter In Xampp Server
To install CodeIgniter follow the following steps:
- Download the latest CodeIgniter by click on the download link version from the official Codeigniter website.
- Unzip the file in your htdocs folder and rename folder to blog.
-
Set the base URL by opening application/config/config.php file with a text editor.
Example:
$config['base_url'] = 'http://localhost/blog';
-
If you want to connect this project with the database, then open the application/config/database.php file with a text editor and set your database settings.
Example:
$db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'my_db', '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 );
- To check CodeIgniter install successfully or not open the following link in your browser.
Directory structure

CodeIgniter directory structure is divided into 3 folders −
- application
- system
- user_guide