blob: 9964813546c6b6ea3356863bffbcd67237b938c5 [file] [log] [blame]
Derek Jones8ede1a22011-10-05 13:34:52 -05001##########################
2Managing your Applications
3##########################
4
5By default it is assumed that you only intend to use CodeIgniter to
6manage one application, which you will build in your application/
7directory. It is possible, however, to have multiple sets of
8applications that share a single CodeIgniter installation, or even to
9rename or relocate your application folder.
10
11Renaming the Application Folder
12===============================
13
14If you would like to rename your application folder you may do so as
15long as you open your main index.php file and set its name using the
16$application_folder variable::
17
18 $application_folder = "application";
19
20Relocating your Application Folder
21==================================
22
23It is possible to move your application folder to a different location
24on your server than your system folder. To do so open your main
25index.php and set a *full server path* in the $application_folder
26variable.
27
28::
29
30 $application_folder = "/Path/to/your/application";
31
32Running Multiple Applications with one CodeIgniter Installation
33===============================================================
34
35If you would like to share a common CodeIgniter installation to manage
36several different applications simply put all of the directories located
37inside your application folder into their own sub-folder.
38
39For example, let's say you want to create two applications, "foo" and
40"bar". You could structure your application folders like this::
41
Derek Jonesa1360ef2011-10-05 17:22:53 -050042 applications/foo/
43 applications/foo/config/
44 applications/foo/controllers/
45 applications/foo/errors/
46 applications/foo/libraries/
47 applications/foo/models/
48 applications/foo/views/
49 applications/bar/
50 applications/bar/config/
51 applications/bar/controllers/
52 applications/bar/errors/
53 applications/bar/libraries/
54 applications/bar/models/
55 applications/bar/views/
Derek Jones8ede1a22011-10-05 13:34:52 -050056
57To select a particular application for use requires that you open your
58main index.php file and set the $application_folder variable. For
59example, to select the "foo" application for use you would do this::
60
61 $application_folder = "applications/foo";
62
63.. note:: Each of your applications will need its own index.php file
64 which calls the desired application. The index.php file can be named
65 anything you want.