CodeIgnitor installing guide
Step 1: Downloading CodeIgnitor MVC Framework
To install CodeIgnitor MVC Framework, first download the CodeIgnitor zip file of from http://www.codeigniter.com/ .
Step 2: Installing CodeIgnitor
Unzip the CodeIgnitor zip compressed file downloaded from http://www.codeigniter.com/ and rename the name of this folder to the application name of your project.
Now move the folder inside your local server.
Incase of WAMPP, move this folder inside the www folder of your localhost.
Incase of XAMP, move this folder inside the htdocs folder of your localhost.
The basic file structure of CodeIgnitor application is as follows.
Step 3:Configuring CodeIgnitor
Before starting the CodeIgnitor application, you need to configure certain configuration.You need to step up right base url of the application.
To setup base_url of the application, open system/application/config/config.php and
edit the base_url array item to point to your server and CodeIgnitor application folder.
$config['base_url'] = "http://localhost/CodeIgnitor_application_name/"; |
Step 4:Testing CodeIgnitor
A quick test can be done to see if CodeIgnitor application is configured and running properly.
Go to localhost/CodeIgnitor_application_name/ and you should see the following output on your browser.
If you're up and running and see the above output, we should finish the configuration. If you application needs the database for storing data ,open system/application/config/database.php file and set the following array items to there corresponding values. This code connects to a MySQL database called "nameOfDatabase" on a localhost with the username "usernameOfHost", and the password, "passwordOfHost".
1
2
3
4
5
| $db['default']['hostname'] = "localhost";$db['default']['username'] = "usernameOfHost";$db['default']['password'] = "passwordOfHost";$db['default']['database'] = "nameOfDatabase";$db['default']['dbdriver'] = "mysql"; |
Additionally, since you will be using the database frequently, you may want it to auto load so that you don't
have to load it each time you connect to database. Open the system/application/config/autoload.php file
and add 'database' to the autoload libaries array as below.
1
| $autoload['libraries'] = array('database'); |
Currently, the CodeIgnitor setup will have a default controller called "welcome.php"; you can find this configuration about default controller in the system/application/controllers folder. Delete it and open your system/application/config/routes.php file. Change the default array item to point to the "defaultController" controller.
1
| $route['default_controller'] = "defaultController" |
CodeIgnitor also has a view file called welcome_message.php file that we do not need inside system/application/view/ folder.
Delete the welcome_message.php file.
That's it.. our CodeIgnitor Application is configured correctly.
We keep on updating such tutorials.
For more such tutorials like our Facebook page.


thanks for detail information... this is very helpful for begineers like me :)
ReplyDeleteFor more tutorials like this you can like our facebook page.
DeleteAdvance php for begineers
(Y)
Delete