title: PHP Includes and Require not working
body: <p>I know this question has been asked before, but even after reading other posts I can't figure out whats going on... </p>
  
  <p>Please have a look at my code structure and see what am I doing wrong..</p>
  
  <p>Folder structure:</p>
  
  <p>index.php</p>
  
  <p>(FOLDER - Includes) header.php </p>
  
  <p>(FOLDER - browse) blog.php , ecommerce.php, other.php </p>
  
  <p>(FOLDER - core) init.php </p>
  
  <p>I'm trying to include Header.php from includes folder in blog.php in browse folder.  Below is my header.php code. </p>
  
  <p>Header file located in Includes folder</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;!--[if lt IE 7 ]&gt;&lt;html class="ie ie6" lang="en"&gt; &lt;![endif]--&gt;
  &lt;!--[if IE 7 ]&gt;&lt;html class="ie ie7" lang="en"&gt; &lt;![endif]--&gt;
  &lt;!--[if IE 8 ]&gt;&lt;html class="ie ie8" lang="en"&gt; &lt;![endif]--&gt;
  &lt;!--[if (gte IE 9)|!(IE)]&gt;&lt;!--&gt;&lt;html lang="en"&gt; &lt;!--&lt;![endif]--&gt;
  &lt;head&gt;
  
      &lt;!-- Basic Page Needs
    ================================================== --&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Web Awwards | Web Gallery | Submit your site&lt;/title&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="author" content=""&gt;
  
      &lt;!-- Mobile Specific Metas
    ================================================== --&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;
  
      &lt;!-- CSS
    ================================================== --&gt;
      &lt;link rel="stylesheet" type="text/css" href="../css/base.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="../css/skeleton.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="../css/layout.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="../css/styles.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="../css/menu.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="../css/submission.css"&gt;
  
      &lt;!--[if lt IE 9]&gt;
          &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  
      &lt;!-- Favicons
      ================================================== --&gt;
      &lt;link rel="shortcut icon" href="images/favicon.ico"&gt;
      &lt;link rel="apple-touch-icon" href="images/apple-touch-icon.png"&gt;
      &lt;link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"&gt;
      &lt;link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php
      require_once('core/init.php');
  ?&gt;
  &lt;!-- Menu Horizontal --&gt;
  &lt;div class="horizontal"&gt;
      &lt;div class="webName"&gt;
  </code></pre>
  
  <p>and Browse folder blog.php file code: </p>
  
  <pre><code>&lt;?php
      include './includes/header.php';
  ?&gt;
  &lt;!-- TODO PHP Scripts --&gt;
  &lt;div class="category nine columns"&gt;
      &lt;div class="category-img"&gt;
          &lt;img src="css/img/webImg/screen1.png" alt="Site Description"/&gt;
      &lt;/div&gt;
      &lt;h3&gt; Web Name &lt;/h3&gt;
      &lt;h5&gt; Designed By: Tautvydas Slegaitis &lt;/h5&gt;
      &lt;h7&gt; Designers url &lt;/h7&gt;
      &lt;div class="vote"&gt;
          &lt;h4&gt; Vote for my site &lt;/h4&gt;
          &lt;/br&gt;
          &lt;a href="#"&gt; Love it &lt;/a&gt;
          &lt;a href="#"&gt; Nope, Not for me &lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;&lt;!-- Close Container Div --&gt;
  &lt;div class="footer"&gt;
  
  
  &lt;/div&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But it is not working. I dont know why,... Please please help me sort this out its killing me for the past 2 days.  Coda 2 is showing me an error </p>
  
  <p>" Warning: include(./includes/header.php): failed to open stream: No such file or directory in - on line 2 Warning: include(): Failed opening './includes/header.php' for inclusion (include_path='.:') in - on line 2 "</p>
  
  <p>init.php code: </p>
  
  <pre><code>&lt;?php
  session_start();
  
  $GLOBALS['config'] = array(
      'mysql' =&gt; array(
          'host' =&gt; 'localhost',
          'username' =&gt; 'root',
          'password' =&gt; 'root',
          'db' =&gt; 'webAwwards'
      ),
      'remember' =&gt; array(
          'cookie_name' =&gt; 'hash',
          'cookie_expire' =&gt; 604800
      ),
      'session' =&gt; array(
          'session_name' =&gt; 'user'
  
      )
  );
  // TODO Remove parenthesis in require once if doesnt work
  spl_autoload_register(function($class) {
      require_once('classes/' . $class . '.php');
  });
  
  require_once('/functions/sanitise.php');
  
  ?&gt;
  </code></pre>