In PHP, what would be the cleanest way to get the parent directory of the current running script relative to the www root? Assume I have:
$_
Fugly, but this will do it:
substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'],basename($_SERVER['SCRIPT_NAME'])))