admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| 2 | <html>
|
| 3 | <head>
|
| 4 |
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 5 | <title>CodeIgniter User Guide</title>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 6 |
|
| 7 | <style type='text/css' media='all'>@import url('../userguide.css');</style>
|
| 8 | <link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
|
| 9 |
|
| 10 | <script type="text/javascript" src="../nav/nav.js"></script>
|
| 11 | <script type="text/javascript" src="../nav/prototype.lite.js"></script>
|
| 12 | <script type="text/javascript" src="../nav/moo.fx.js"></script>
|
| 13 | <script type="text/javascript">
|
| 14 | window.onload = function() {
|
| 15 | myHeight = new fx.Height('nav', {duration: 400});
|
| 16 | myHeight.hide();
|
| 17 | }
|
| 18 | </script>
|
| 19 |
|
| 20 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
| 21 | <meta http-equiv='expires' content='-1' />
|
| 22 | <meta http-equiv= 'pragma' content='no-cache' />
|
| 23 | <meta name='robots' content='all' />
|
| 24 | <meta name='author' content='Rick Ellis' />
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 25 | <meta name='description' content='CodeIgniter User Guide' />
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 26 |
|
| 27 | </head>
|
| 28 | <body>
|
| 29 |
|
| 30 | <!-- START NAVIGATION -->
|
| 31 | <div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
|
| 32 | <div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
|
| 33 | <div id="masthead">
|
| 34 | <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
| 35 | <tr>
|
Derek Allard | 60ca9b7 | 2007-07-12 19:53:27 +0000 | [diff] [blame] | 36 | <td><h1>CodeIgniter User Guide Version 1.5.4</h1></td>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 37 | <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
|
| 38 | </tr>
|
| 39 | </table>
|
| 40 | </div>
|
| 41 | <!-- END NAVIGATION -->
|
| 42 |
|
| 43 |
|
| 44 | <!-- START BREADCRUMB -->
|
| 45 | <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
|
| 46 | <tr>
|
| 47 | <td id="breadcrumb">
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 48 | <a href="http://www.codeigniter.com/">CodeIgniter Home</a> ›
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 49 | <a href="../index.html">User Guide Home</a> ›
|
| 50 | Managing your Applications
|
| 51 | </td>
|
Derek Allard | bc03091 | 2007-06-24 18:25:29 +0000 | [diff] [blame] | 52 | <td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 53 | </tr>
|
| 54 | </table>
|
| 55 | <!-- END BREADCRUMB -->
|
| 56 |
|
| 57 | <br clear="all" />
|
| 58 |
|
| 59 |
|
| 60 | <!-- START CONTENT -->
|
| 61 | <div id="content">
|
| 62 |
|
| 63 | <h1>Managing your Applications</h1>
|
| 64 |
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 65 | <p>By default it is assumed that you only intend to use CodeIgniter to manage one application, which you will build in your
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 66 | <dfn>system/application/</dfn> directory. It is possible, however, to have multiple sets of applications that share a single
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 67 | CodeIgniter installation, or even to rename or relocate your <dfn>application</dfn> folder.</p>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 68 |
|
| 69 | <h2>Renaming the Application Folder</h2>
|
| 70 |
|
Derek Allard | b8f3504 | 2007-04-09 02:03:32 +0000 | [diff] [blame] | 71 | <p>If you would like to rename your <dfn>application</dfn> folder you may do so as long as you open your main <kbd>index.php</kbd>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 72 | file and set its name using the <samp>$application_folder</samp> variable:</p>
|
| 73 |
|
| 74 | <code>$application_folder = "application";</code>
|
| 75 |
|
| 76 | <h2>Relocating your Application Folder</h2>
|
| 77 |
|
| 78 | <p>It is possible to move your <dfn>application</dfn> folder to a different location on your server than your <kbd>system</kbd> folder.
|
| 79 | To do so open your main <kbd>index.php</kbd> and set a <em>full server path</em> in the <samp>$application_folder</samp> variable.</p>
|
| 80 |
|
| 81 |
|
| 82 | <code>$application_folder = "/Path/to/your/application";</code>
|
| 83 |
|
| 84 |
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 85 | <h2>Running Multiple Applications with one CodeIgniter Installation</h2>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 86 |
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 87 | <p>If you would like to share a common CodeIgniter installation to manage several different applications simply
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 88 | put all of the directories located inside your <kbd>application</kbd> folder into their
|
| 89 | own sub-folder.</p>
|
| 90 |
|
| 91 | <p>For example, let's say you want to create two applications, "foo" and "bar". You will structure your
|
Derek Allard | c644128 | 2007-07-04 23:54:32 +0000 | [diff] [blame] | 92 | application folder like this:</p>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 93 |
|
| 94 | <code>system/application/<var>foo</var>/<br />
|
| 95 | system/application/<var>foo</var>/config/<br />
|
| 96 | system/application/<var>foo</var>/controllers/<br />
|
| 97 | system/application/<var>foo</var>/errors/<br />
|
| 98 | system/application/<var>foo</var>/libraries/<br />
|
| 99 | system/application/<var>foo</var>/models/<br />
|
| 100 | system/application/<var>foo</var>/views/<br />
|
| 101 | system/application/<samp>bar</samp>/<br />
|
| 102 | system/application/<samp>bar</samp>/config/<br />
|
| 103 | system/application/<samp>bar</samp>/controllers/<br />
|
| 104 | system/application/<samp>bar</samp>/errors/<br />
|
| 105 | system/application/<samp>bar</samp>/libraries/<br />
|
| 106 | system/application/<samp>bar</samp>/models/<br />
|
| 107 | system/application/<samp>bar</samp>/views/</code>
|
| 108 |
|
| 109 |
|
| 110 | <p>To select a particular application for use requires that you open your main <kbd>index.php</kbd> file and set the <dfn>$application_folder</dfn>
|
| 111 | variable. For example, to select the "foo" application for use you would do this:</p>
|
| 112 |
|
| 113 | <code>$application_folder = "application/foo";</code>
|
| 114 |
|
| 115 | <p class="important"><strong>Note:</strong> Each of your applications will need its own <dfn>index.php</dfn> file which
|
| 116 | calls the desired application. The index.php file can be named anything you want.</p>
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 | </div>
|
| 123 | <!-- END CONTENT -->
|
| 124 |
|
| 125 |
|
| 126 | <div id="footer">
|
| 127 | <p>
|
Derek Allard | 9da4dbc | 2007-04-03 11:39:35 +0000 | [diff] [blame] | 128 | Previous Topic: <a href="profiling.html">Profiling Your Application</a>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 129 | ·
|
| 130 | <a href="#top">Top of Page</a> ·
|
| 131 | <a href="../index.html">User Guide Home</a> ·
|
| 132 | Next Topic: <a href="alternative_php.html">Alternative PHP Syntax</a>
|
Derek Allard | c644128 | 2007-07-04 23:54:32 +0000 | [diff] [blame] | 133 | </p>
|
Derek Allard | d2df9bc | 2007-04-15 17:41:17 +0000 | [diff] [blame] | 134 | <p><a href="http://www.codeigniter.com">CodeIgniter</a> · Copyright © 2007 · <a href="http://ellislab.com/">Ellislab, Inc.</a></p>
|
admin | a2b1209 | 2006-10-31 03:26:00 +0000 | [diff] [blame] | 135 | </div>
|
| 136 |
|
| 137 | </body>
|
| 138 | </html> |