admin | b0dd10f | 2006-08-25 17:25:49 +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 |
|
| 5 | <title>Code Igniter User Guide</title>
|
| 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="../scripts/nav.js"></script>
|
| 11 | <script type="text/javascript" src="../scripts/prototype.lite.js"></script>
|
| 12 | <script type="text/javascript" src="../scripts/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' />
|
| 25 | <meta name='description' content='Code Igniter User Guide' />
|
| 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>
|
admin | 9fc347d | 2006-09-21 00:00:28 +0000 | [diff] [blame] | 36 | <td><h1>Code Igniter User Guide Version 1.4.1</h1></td>
|
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 37 | <td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</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">
|
| 48 | <a href="http://www.codeigniter.com/">Code Igniter Home</a> ›
|
| 49 | <a href="../index.html">User Guide Home</a> ›
|
| 50 | Upgrading from 1.2 to 1.3
|
| 51 | </td>
|
| 52 | <td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.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>
|
| 53 | </tr>
|
| 54 | </table>
|
| 55 | <!-- END BREADCRUMB -->
|
| 56 |
|
| 57 | <br clear="all" />
|
| 58 |
|
| 59 |
|
| 60 | <!-- START CONTENT -->
|
| 61 | <div id="content">
|
| 62 |
|
| 63 | <h1>Upgrading from 1.2 to 1.3</h1>
|
| 64 |
|
| 65 | <p class="important"><strong>Note:</strong> The instructions on this page assume you are running version 1.2. If you
|
| 66 | have not upgraded to that version please do so first.</p>
|
| 67 |
|
| 68 |
|
| 69 | <p>Before performing an update you should take your site offline by replacing the index.php file
|
| 70 | with a static one.</p>
|
| 71 |
|
| 72 |
|
| 73 | <h2>Step 1: Update your Code Igniter files</h2>
|
| 74 |
|
| 75 | <p>Replace the following directories in your "system" folder with the new versions:</p>
|
| 76 |
|
| 77 | <p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p>
|
| 78 |
|
| 79 | <ul>
|
| 80 | <li>application/<strong>models</strong>/ (new for 1.3)</li>
|
| 81 | <li>codeigniter (new for 1.3)</li>
|
| 82 | <li>drivers</li>
|
| 83 | <li>helpers</li>
|
| 84 | <li>init</li>
|
| 85 | <li>language</li>
|
| 86 | <li>libraries</li>
|
| 87 | <li>plugins</li>
|
| 88 | <li>scaffolding</li>
|
| 89 | </ul>
|
| 90 |
|
| 91 |
|
| 92 | <h2>Step 2: Update your error files</h2>
|
| 93 |
|
| 94 | <p>Version 1.3 contains two new error templates located in <dfn>application/errors</dfn>, and for naming consistency the other error templates have
|
| 95 | been renamed.</p>
|
| 96 |
|
| 97 | <p>If you <strong>have not</strong> customized any of the error templates simply
|
| 98 | replace this folder:</p>
|
| 99 |
|
| 100 | <ul>
|
| 101 | <li>application/errors/</li>
|
| 102 | </ul>
|
| 103 |
|
| 104 | <p>If you <strong>have</strong> customized your error templates, rename them as follows:</p>
|
| 105 |
|
| 106 |
|
| 107 | <ul>
|
| 108 | <li>404.php = error_404.php</li>
|
| 109 | <li>error.php = error_general.php</li>
|
| 110 | <li>error_db.php (new)</li>
|
| 111 | <li>error_php.php (new)</li>
|
| 112 | </ul>
|
| 113 |
|
| 114 |
|
| 115 | <h2>Step 3: Update your index.php file</h2>
|
| 116 |
|
| 117 | <p>Please open your main <dfn>index.php</dfn> file (located at your root). At the very bottom of the file, change this:</p>
|
| 118 |
|
| 119 | <code>require_once BASEPATH.'libraries/Front_controller'.EXT;</code>
|
| 120 |
|
| 121 | <p>To this:</p>
|
| 122 |
|
| 123 | <code>require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;</code>
|
| 124 |
|
| 125 |
|
| 126 | <h2>Step 4: Update your config.php file</h2>
|
| 127 |
|
| 128 | <p>Open your <dfn>application/config/config.php</dfn> file and add these new items:</p>
|
| 129 |
|
| 130 | <pre>
|
| 131 | /*
|
| 132 | |------------------------------------------------
|
| 133 | | URL suffix
|
| 134 | |------------------------------------------------
|
| 135 | |
|
| 136 | | This option allows you to add a suffix to all URLs.
|
| 137 | | For example, if a URL is this:
|
| 138 | |
|
| 139 | | www.your-site.com/index.php/products/view/shoes
|
| 140 | |
|
| 141 | | You can optionally add a suffix, like ".html",
|
| 142 | | making the page appear to be of a certain type:
|
| 143 | |
|
| 144 | | www.your-site.com/index.php/products/view/shoes.html
|
| 145 | |
|
| 146 | */
|
| 147 | $config['url_suffix'] = "";
|
| 148 |
|
| 149 |
|
| 150 | /*
|
| 151 | |------------------------------------------------
|
| 152 | | Enable Query Strings
|
| 153 | |------------------------------------------------
|
| 154 | |
|
| 155 | | By default Code Igniter uses search-engine and
|
| 156 | | human-friendly segment based URLs:
|
| 157 | |
|
| 158 | | www.your-site.com/who/what/where/
|
| 159 | |
|
| 160 | | You can optionally enable standard query string
|
| 161 | | based URLs:
|
| 162 | |
|
| 163 | | www.your-site.com?who=me&what=something&where=here
|
| 164 | |
|
| 165 | | Options are: TRUE or FALSE (boolean)
|
| 166 | |
|
| 167 | | The two other items let you set the query string "words"
|
| 168 | | that will invoke your controllers and functions:
|
| 169 | | www.your-site.com/index.php?c=controller&m=function
|
| 170 | |
|
| 171 | */
|
| 172 | $config['enable_query_strings'] = FALSE;
|
| 173 | $config['controller_trigger'] = 'c';
|
| 174 | $config['function_trigger'] = 'm';
|
| 175 | </pre>
|
| 176 |
|
| 177 |
|
| 178 | <h2>Step 5: Update your database.php file</h2>
|
| 179 |
|
| 180 | <p>Open your <dfn>application/config/database.php</dfn> file and add these new items:</p>
|
| 181 |
|
| 182 | <pre>
|
| 183 | $db['default']['dbprefix'] = "";
|
| 184 | $db['default']['active_r'] = TRUE;
|
| 185 | </pre>
|
| 186 |
|
| 187 |
|
| 188 | <h2>Step 6: Update your user guide</h2>
|
| 189 |
|
| 190 | <p>Please also replace your local copy of the user guide with the new version.</p>
|
| 191 |
|
| 192 | </div>
|
| 193 | <!-- END CONTENT -->
|
| 194 |
|
| 195 |
|
| 196 | <div id="footer">
|
| 197 | <p>
|
| 198 | Previous Topic: <a href="index.html">Installation Instructions</a>
|
| 199 | ·
|
| 200 | <a href="#top">Top of Page</a> ·
|
| 201 | <a href="../index.html">User Guide Home</a> ·
|
| 202 | Next Topic: <a href="../overview/at_a_glance.html">Code Igniter at a Glance</a>
|
| 203 | <p>
|
| 204 |
|
| 205 | <p><a href="http://www.codeigniter.com">Code Igniter</a> · Copyright © 2006 · <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
|
| 206 | </div>
|
| 207 |
|
| 208 | </body>
|
| 209 | </html> |