blob: edc94d284a33eb96f945b035713d1e2ee9f33d9e [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
42 applications/foo/ applications/foo/config/ applications/foo/controllers/ applications/foo/errors/ applications/foo/libraries/ applications/foo/models/ applications/foo/views/ applications/bar/ applications/bar/config/ applications/bar/controllers/ applications/bar/errors/ applications/bar/libraries/ applications/bar/models/ applications/bar/views/
43
44To select a particular application for use requires that you open your
45main index.php file and set the $application_folder variable. For
46example, to select the "foo" application for use you would do this::
47
48 $application_folder = "applications/foo";
49
50.. note:: Each of your applications will need its own index.php file
51 which calls the desired application. The index.php file can be named
52 anything you want.