From: Richard Quadling on
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.

Regards,

Richard.

--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
From: Stuart on
2009/8/24 Richard Quadling <rquadling(a)googlemail.com>:
> 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/