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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/8/24 Richard Quadling <rquadling@xxxxxxxxxxxxxx>:
> 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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux