menu

Friday, 5 December 2014

Install and Configure CodeIgniter Framework

CodeIgniter is one of the most popular PHP frameworks around. It uses the Model-View-Controller Architectural design pattern and it’s considered by lots of developers as one of the best framework solution for small to medium projects.
First of all, you need to download. https://ellislab.com/codeigniter/user-guide/installation/downloads.html.
Why Codeigniter Framework is Better than Custom PHP Development

Configuring CodeIgniter
  Now you have CodeIgniter installed on your server for the configuration. Open the application/config/config.php file and set your base URL. If you intend to use encryption or sessions, set your encryption key. For the database configuration, open the application/config/database.php and update with your details.

The following is a quick description of what you can do by editing some of the most commonly used configuration files:
- autoload.php: specifies which systems (Packages, Libraries, Helper files, Custom config files, Language files and Models) should be loaded by default.
- config.php: contains all website configuration.
- constants.php: contains defined constants which are used when checking and setting modes when working with the file system.
- database.php: contains the settings needed to access your database.
- email.php: This file is not created by default. But you can create it and set the default values for the email class. Like: mailtype, charset, newline, protocol, smtp_host, etc.
- hooks.php: lets you define “hooks” to extend CI without editing the core files.
- mime.php: contains an array of mime types. It is used by the upload class to help identify allowed file type.
- routes.php: lets you re-map URI requests to specific controller functions.
- smileys.php: contains an array of smileys for use with the emoticon helper.
- upload.php: This file is not created by default. But you can create it and set the default values for the upload class. Like: upload_path, allowed_types, max_size, max_width, max_height, etc.
- user_agents.php: contains four arrays of user agent data. It is used by the User Agent Class to help identify browser, platform, robot, and mobile device data. The array keys are used to identify the device and the array values are used to set the actual name of the item.