title: understanding relative paths and absolute paths
body: <p>Wondering why php keeps telling me a file doesnt exist when it does.</p>
  
  <p>this is my code and error</p>
  
  <pre><code>    require_once('/book/admin/bin/class/db.class.php');
  </code></pre>
  
  <p>Error and stack trace</p>
  
  <pre><code>   Warning: require_once(/book/admin/bin/class/db.class.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\book\forms\add.php on line 3
      Call Stack
      #   Time    Memory  Function    Location
      1   0.1479  408440  {main}( )   ..\add.php:0
  </code></pre>
  
  <p>This happens a lot and i want to rectify this annoying reoccurring problem. Is there a way I can set up my web server to read from the root of the site like I'm asking it too? Or am I misunderstanding what is happening.</p>
  
  <p>This is how directory structure looks.</p>
  
  <p>using a wamp server</p>
  
  <pre><code>c:\wamp\www\book &lt;- my site root
  c:\wamp\www\book\forms &lt;- where add.php is located
  c:\wamp\www\book\admin\bin\class\db.class.php
  </code></pre>
  
  <p>Why can I not use filepath as "/book/bin/" </p>
  
  <p>Thanks,
  C</p>