I\'m using WAMP and have a development site in the www directory. I want to use dirname(__FILE__) to define the path to the server root.
dirname(__FILE__)
Currently I\'m
$server = str_replace('\\','/',$_SERVER['SERVER_NAME']); $server = (substr($server,-1)=='/'?substr($server,0,strlen($server)-1):$server); !defined('PATH')?define('PATH', 'http://'.str_replace($_SERVER['DOCUMENT_ROOT'],$server , str_replace('\\','/',dirname(__FILE__)))):'';