title: dirname(__FILE__) on localhost
body: <p>I'm using WAMP and have a development site in the www directory. I want to use <code>dirname(__FILE__)</code> to define the path to the server root. </p>
  
  <p>Currently I'm using a config file which contains:</p>
  
  <pre><code>define('PATH', dirname(__FILE__));
  </code></pre>
  
  <p>I'm including the config file in in my <code>header.php</code> file like this:</p>
  
  <pre><code>&lt;?php require_once("config.php") ?&gt;
  </code></pre>
  
  <p>Then, on my sub pages I use the constant <code>PATH</code> to define the path by including <code>header.php</code>.</p>
  
  <pre><code>&lt;?php require_once("../inc/header.php"); ?&gt; 
  </code></pre>
  
  <p>However, my links are coming out like this:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="C:\wamp\www/css/style.css" /&gt;
  </code></pre>
  
  <p>What do I need to do to fix this? And since I'm including my constant in the <code>header.php</code> file I don't have access to the constant in the initial <code>require_once("../inc/header.php");</code> What other method can I use to find the root for <code>header.php</code>?</p>