Setting up multiple applications with CodeIgniter

How can we use codeigniter framework directory to create multiple applications? Many times we need to run multiple codeigniter application . For all project we need the codeigniter system folder. If we copy the whole folder then it makes us trouble to update the codeigniter core. So that we use a unique codeigniter system for our multiple application. Lets see how we can do that.
The codeigniter structure is like this.
codeigniter file structure

Adjusting the application folders
First thing I do is to move the application folder out of the system folder to the same level as the system folder.
move the application folder

Since I’m setting up to run two distinct sites sharing the same CI core. So i make two folder and named them ci_series_1 and ci_series_2 . Then put the application folder both of this folder. Then we copy the index.php file inside this two folder. Now the structure is look like

multiple site structure
The folder structure inside ci_series_1
folder structure inside ci_series_1
Now we have to change the location of the system folder inside the index.php file. Now open index.php inside ci_series_1 folder and change


$system_folder = "system";

To


$system_folder = "../system";

Now all our work is done. Lets test our ci_series_1 is running well or not?
In the browser type http://localhost/CodeIgniter/ci_series_1/ and you will see the ci_series_1 well come message.
ci_series_1 wellcome message
You can see related article in exclusivetutorials site, 

Related Posts

  • CodeIgniter: Creating and Sending Parameters Between Controller and View
  • CodeIgniter: Preparing Database
  • Introduction to CodeIgniter Framework
  • CodeIgniter: Getting Parameters From GET
  • CodeIgniter: Showing Simple One Data
the coder

Got something to say? Go for it!

*