title: How to set up CodeIgniter site on localhost?
body: <p>I'm new to CodeIgniter. I am trying to set up a CodeIgniter site on my local host. The site is working fine online. Here are the steps I have undertaken to migrate the site to my local host.</p>
  
  <ol>
  <li><p>edited the base_url in the application/config/congfig.php</p>
  
  <pre><code>$config['base_url']      = "http://localhost/MyProjects/Project/reservation/";</code></pre></li>
  <li><p>changed the database connect settings in the application/config/database.php to connect to localhost database</p></li>
  <li>have set up the database</li>
  </ol>
  
  <p>The working site URL looks like this: www.example.com/reservation/index.php</p>
  
  <p>I have placed the site files in MyProjects/Project directory in local server.
  I am trying to access </p>
  
  <pre><code>'http://localhost/MyProjects/Project/reservation/index.php'</code></pre>
  
  <p>But it returns the blank page. (Empty body element: )</p>
  
  <p>here are the contents of the application\config\routes.php</p>
  
  <pre><code>$route['default_controller'] = "admin";
  $route['scaffolding_trigger'] = "";  
  
  require_once BASEPATH.'database/DB'.EXT;
  
  $db_obj = DB(); 
  $new_branches = $db_obj-&gt;get('table_branches');
  $new_branches = $new_branches-&gt;result();
  
  
  foreach($new_branches as $branch){
     $route[trim($branch-&gt;url)]   = "reserve/index/".$branch-&gt;url;
     $route[trim($branch-&gt;url).'/']   = "reserve/index/".$branch-&gt;url;
     $route[trim($branch-&gt;url).'/admin']  = "admin";
  
  }
  </code></pre>
  
  <p>Can anyone please help me with this? </p>