best way to access/create SITE_ROOT and SERVER_ROOT values in PHP?
<p>I need 2 different paths, one for includes and one for js/css etc. I'm using <code>mod_rewrite</code>. The below works fine....</p>

<p>Currently all my files contain this at the top</p>

<pre><code>define('SERVER_ROOT',   'C:/wamp/www/site_folder/');
define('SITE_ROOT',     'http://localhost/site_folder/');
</code></pre>

<p>and then files are called like so:</p>

<pre><code>require_once SERVER_ROOT . 'st_wd_assets/inc/func_st_wd.php';    

&lt;link rel="stylesheet" type="text/css" href="&lt;?php echo SITE_ROOT;?&gt;st_pages/user_area/css/user_area.css" media="screen"/&gt;
</code></pre>

<p>as you can probably see, it's going to be a massive chore to update the top of every file everytime i move versions between the localhost and my live server.</p>

<p>What's the best/standard way of defining these ROOT values?</p>

<p>I can't see a solution in the <code>$_SERVER</code> super global? Do people normally just use VirtualHosts? But then wouldn't it still be necessary to define ROOT constants? </p>
