CodeIgniter Forums
CI with multiple sites in xampp - 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: CI with multiple sites in xampp (/showthread.php?tid=26328)



CI with multiple sites in xampp - El Forum - 01-11-2010

[eluser]sasori[/eluser]
Hi, can somebody tell/explain how to set up the codeigniter in xampp, where in, all the
folders under the htdocs will benefit from it?
or do I need to have a separate codeigniter package for every application that I am working on ?


CI with multiple sites in xampp - El Forum - 01-11-2010

[eluser]Rick Jolly[/eluser]
In each index.php bootstrap you can set the system directory to any place you like.


CI with multiple sites in xampp - El Forum - 01-11-2010

[eluser]sasori[/eluser]
[quote author="Rick Jolly" date="1263252001"]In each index.php bootstrap you can set the system directory to any place you like.[/quote]

you mean to say, all I have to do is move the system folder away from the htdocs ?
and then, each web app can have its own CI application folder only, and then,
give each web app the index.php this line = $system_folder = "system";
is that what you mean ? OR ?


CI with multiple sites in xampp - El Forum - 01-11-2010

[eluser]Rick Jolly[/eluser]
I mean exactly what I wrote. In CI both the system and application directory locations are configurable in index.php. Instructions are right there in the index.php comments
Code:
/*
|---------------------------------------------------------------
| SYSTEM FOLDER NAME
|---------------------------------------------------------------
|
| This variable must contain the name of your "system" folder.
| Include the path if the folder is not in the same  directory
| as this file.
|
| NO TRAILING SLASH!
|
*/
$system_folder = "system";
You could change the system folder location using an absolute or relative path. For example, if you wanted the system folder located one level above your application, and you wanted to change the name from "system" to "CI", you could do this:
Code:
$system_folder = "../CI";



CI with multiple sites in xampp - El Forum - 01-11-2010

[eluser]sasori[/eluser]
does that process will allow me to use only "1" system folder for all the web app made up of CI ?


CI with multiple sites in xampp - El Forum - 01-11-2010

[eluser]Dyllon[/eluser]
[quote author="sasori" date="1263287819"]does that process will allow me to use only "1" system folder for all the web app made up of CI ?[/quote]
Yep.


CI with multiple sites in xampp - El Forum - 01-11-2010

[eluser]sasori[/eluser]
haha awesome..it worked