Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running CodeIgniter Project

I have a Whole web site project based on CodeIgniter framework. My problem is i don't know how to run this project on my local Mamp Server. I have Successfully set up Mamp and Also run the latest version of CodeIgniter. enter image description here

But now how can i run the whole project using CodeIgniter found in my localhost folder. This is my first experience with a CMS Framework.

like image 203
Dimitri Avatar asked May 13 '13 05:05

Dimitri


2 Answers

Open application/config folder

First go to config.php file and point the base url to the correct location

$config['base_url'] = '';

than goes to the database.php and provide correct database parameters


$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'user';
$db['default']['password'] = 'password';
$db['default']['database'] = 'dbname';

thats the most basic changes u have to do....
now if you want to redirect it to specific controller by default go to routes.php file in config directory and change this vairable $route['default_controller'] = "yourcontrollername"

like image 135
Yasir Ahmed Avatar answered Nov 10 '22 07:11

Yasir Ahmed


At first config your site settings using config.php and also for database settings edit the database.php and then in file router.php file give the default controller name for your site

$route['default_controller'] = 'login';

that will help to open an controller on the first loading of the project like login page or homepage etc,and then open your website like

http://your_ip/project_folder_name/

then it will directly open your default controller page.I think it will help for you as well.these are the very basic things that can help you to run the project ,glad that you are working on CodeIgniter,this framework is very flexible and easy to learn,enjoy to work on this

like image 28
Gautam3164 Avatar answered Nov 10 '22 06:11

Gautam3164