How to install CodeIgniter
Download CodeIgniter :
Click here:
Configuring the base URL:
Open the config.php file located in application/config/config.php directory
Look for the line that says
$config['base_url'] = '';
If the base_url is blank, CodeIgniter will try to guess the root URL but this is not guaranteed to always work so it’s better to explicitly set it. Enter our project URL as shown below
$config['base_url'] = 'http://localhost/package_name/';
HERE,
“'http://localhost/package_name/'” will be returned when you call the base URL helper function. We will talk more about the base URL later.
Removing the index.php segment from the URLs
Configuring the database connection parameters:
This section assumes you have a working MySQL installation, password security has been enforced and you have a database already created in MySQL.
Open the database.php file located in application/config/database.php directory
Look for $db['default'] array
Change the variables for hostname, username, password, and database to the following values
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'xxxx',
'database' => 'bootsshop_db',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
Summary
CodeIgniter is an easy to install easy to configure PHP MVC framework. The most important configurations are setting up the base URL, removing index.php from URLs for search engine optimization and setting up the database configuration.
What’s next?
Read the tutorial on understanding CodeIgniter Directory Structure
Download CodeIgniter :
Click here:
Configuring the base URL:
Open the config.php file located in application/config/config.php directory
Look for the line that says
$config['base_url'] = '';
If the base_url is blank, CodeIgniter will try to guess the root URL but this is not guaranteed to always work so it’s better to explicitly set it. Enter our project URL as shown below
$config['base_url'] = 'http://localhost/package_name/';
HERE,
“'http://localhost/package_name/'” will be returned when you call the base URL helper function. We will talk more about the base URL later.
Removing the index.php segment from the URLs
Configuring the database connection parameters:
This section assumes you have a working MySQL installation, password security has been enforced and you have a database already created in MySQL.
Open the database.php file located in application/config/database.php directory
Look for $db['default'] array
Change the variables for hostname, username, password, and database to the following values
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'xxxx',
'database' => 'bootsshop_db',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
Summary
CodeIgniter is an easy to install easy to configure PHP MVC framework. The most important configurations are setting up the base URL, removing index.php from URLs for search engine optimization and setting up the database configuration.
What’s next?
Read the tutorial on understanding CodeIgniter Directory Structure
Comments
Post a Comment