Re: Determining the exact location of the CLI executing the current script?

Stuart <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <[email protected]>
2009/8/24 Richard Quadling <[email protected]>:
> Hi.
>
> Seems like I'm missing something REALLY obvious.
>
> I can find the name of the script at runtime, the parameters, the
> SAPI, etc. Loads of info.
>
> But I can't seem to find the exact name of the executable handing the script.
>
> Which seems a little odd.
>
> Unless I'm missing something.

There is nothing built-in to get you this, but assuming you're on a
unix platform you can use an evil combination of getmypid() and
executing ps to get what you want. I'm sure similar is possible under
Windows but either way it's not very clean.

-Stuart

-- 
http://stut.net/

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.