Reply to Re: Which PHP am I running?

Your name:

Reply:


Posted by Richard Levasseur on 07/08/06 09:22

Csaba Gabor wrote:
> Is there a way to determine the path to the php executable (as opposed
> to the script. In other words, I am looking for the path to php.exe or
> php-win.exe) that is currently running (ie. how was this script called)
> on Windows (I'm on Win XP Pro)? WScript/CScript (when programming in
> VBScript) allow this, for example.
>
> Failing that, is there any way to conclusively determine whether the
> script that is running was invoked from php.exe or php-win.exe? I say
> conclusively, because often there is a slight difference in the
> environment variables, but it need not be the case.
>
> Thanks,
> Csaba Gabor from New York

Running phpinfo() should tell you if its running as a module or cgi. I
believe it also has path information. It is probably in at least one
of the directories of the path variables. Barring all that, you could
search the file system with a script or exec() call

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация