CodeIgniter config

application/config/config.php:

<?php
$config['encryption_key'] = 'encryption_key';

application/config/autoload.php:

<?php
$autoload['libraries'] = array( 'database', 'session' );
 
$autoload['helper'] = array( 'url', 'file', 'html' );

application/config/database.php:

<?php
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'codeigniter';

application/config/routes.php:

<?php
$route['default_controller'] = "posts";

Create .htaccess:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Leave a Reply

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