title: php how to do include right way
body: <p>Hello i'm running WAMP (32 Bit) server</p>
  
  <p>i exec C:\wamp\www\1\index.php using browser with this address <a href="http://localhost:8080/1/" rel="nofollow">http://localhost:8080/1/</a> </p>
  
  <p>index.php has the follow code </p>
  
  <pre><code>require_once 'libraries/database/database.php';
  </code></pre>
  
  <p>database.php has the follow code</p>
  
  <pre><code>require_once '../misc/traits/singleton.php';
  </code></pre>
  
  <p>singleton.php is located in this location </p>
  
  <pre><code>C:\wamp\www\1\libraries\misc\traits\singleton.php
  </code></pre>
  
  <p>database.php is located in this location</p>
  
  <pre><code>C:\wamp\www\1\libraries\database\database.php
  </code></pre>
  
  <p>and there is error(s):</p>
  
  <p>( ! ) Warning: require_once(../misc/traits/singleton.php): failed to open stream: No such file or directory in C:\wamp\www\1\libraries\database\database.php on line 3</p>
  
  <p>( ! ) Fatal error: require_once(): Failed opening required '../misc/traits/singleton.php' (include_path='.;C:\php\pear') in C:\wamp\www\1\libraries\database\database.php on line 3</p>
  
  <p>Thanks</p>