Running CodeIgniter Project
Asked Answered
R

4

6

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.

Relaxation answered 13/5, 2013 at 5:15 Comment(10)
You're already running it. The big issue here is that Codeigniter IS NOT a CMS, it's a framework, i.e. a collection of tools to build any kind of websites (a CMS too). You might have been expecting something else?Naman
Have a look in the tutorial. phpacademy.org/tutorial/…Romero
@ Damien Pirsy you're right, sorry for my lack of precision and knowledge. @ Sharif Ul Islam thanks i'll take a look at the tutorial :)Relaxation
@Dimitri, you are creating a new Project, or you have to run an existing project?Delicatessen
@Nishant, i have an existing projectRelaxation
then why are you setting up a new codeigniter. you just have to create a virtual host and take a new checkout and point your virtual host to the checkoutDelicatessen
how to achieve this ? i am new to this type of development do you have a tutorial to follow ?Relaxation
@dimitri which enviornment are you using for development? linux or windowsDelicatessen
@Delicatessen : I have a macBook pro with MampRelaxation
Have you solved this issue?Onslaught
I
5

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"

Irascible answered 13/5, 2013 at 8:7 Comment(2)
is this ok mrforbes.com/blog/2009/02/…Relaxation
i did what you said i got the following error : 404 Page Not Found The page you requested was not found.Relaxation
W
1

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

Williemaewillies answered 13/5, 2013 at 5:23 Comment(1)
thanks you it help me a lot but i am having 404 Page Not Found The page you requested was not found. i believe this have to do with .htaccessRelaxation
H
0

Use localhost/name_of_the_codeigniter_folder_inside_htdocs/index.php/name_of_the_controller_file_you_want_to_execute/name_of_the_function_inside_the_file_which_you_want_to_execute

Hope this helps!

Hendecasyllable answered 22/6, 2017 at 20:19 Comment(0)
S
0

You can run the CI project by starting your server and just type this in your broser -

localhost/folderName
Statvolt answered 30/1 at 7:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.