CodeIgniter Forums
Multiple CI Applications - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Multiple CI Applications (/showthread.php?tid=15628)



Multiple CI Applications - El Forum - 02-10-2009

[eluser]donkey_[/eluser]
Hi folks,

When I was reading the CI User Guide I discovered that I can use Code Igniter for Multiple Applications so when I store more than 1 application in /system/application how can I choose which application I want to see as default?


Multiple CI Applications - El Forum - 02-11-2009

[eluser]Adi Setiawan[/eluser]
UPDATE:
I just read http://ellislab.com/codeigniter/user-guide/general/managing_apps.html and it self explanatory Big Grin

---

I have not try it yet but by looking at index.php I can see that you can have both 'system' and 'application' in different location. i.e:
/home/ci/system -- this is CI system
/home/user1/application1 -- fist app
/home/user2/application2 -- second app

/home/user1/public_html/index.php -- first app
/home/user2/public_html/index.php -- second app

just change each $system_folder and $application_folder in index.php to the correct location


Multiple CI Applications - El Forum - 02-12-2009

[eluser]Mirage[/eluser]
Adi is correct. You use a separate front-controller ('index.php') to target a given application.

Creating folders in your public html directory and copying a modified index.php into it is one way.

You can also use a single index.php, do a URL evaluation in there and then set your $application_folder dynamically based on that evaluation.

HTH,
J


Multiple CI Applications - El Forum - 02-12-2009

[eluser]brianw1975[/eluser]
i think this may be the answer i was looking forward to seeing when i posted my reply here

very excellent ability.