location of the PHP executable
| From: | Mattias Thorslund | Date: | Wed, 11 Apr 2007 19:49:54 +0000 |
| Subject: | location of the PHP executable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-252622@lists.php.net to get a copy of this message | ||
Hi,
I have looked in the documentation but can't find it:
My PHP script (which is run from the command prompt - CLI) needs to know
the file system location of the PHP executable. This is because it needs
to run a second PHP script. I know about the "which" command but it's
not available in all OSes, and that might not be the currently running
executable anyway.
I could prompt the user for this, but that seems kind of silly. Surely,
there must be some way of looking it up automatically?
Thanks,
Mattias