Get absolute path of current script
<p>I have searched high and low and get a lot of different solutions and varialbles containing info to get the absolute path. But they seem to work under some conditions and not under others. Is there one silver bullet way to get the absolute path to the current executing script in php? For me the script will be running from the command line but it should just as well function if run within apache etc.</p>

<p>Clarification: The initial executed script (I only had one here so therefore I missed stating that)</p>
