Re: [PHP-DEV] Determine the name of the PHP SAPI module.

2011-03-31 Thread Richard Quadling
On 31 March 2011 10:31, Rasmus Lerdorf wrote: > #include "SAPI.h" > > and then you will have the name in the global sapi_module struct: > > sapi_module.name > > -Rasmus > > On 03/31/2011 02:24 AM, Richard Quadling wrote: >> Hi. >> >> From a CLI/CGI perspective, the following code returns the full

Re: [PHP-DEV] Determine the name of the PHP SAPI module.

2011-03-31 Thread Rasmus Lerdorf
#include "SAPI.h" and then you will have the name in the global sapi_module struct: sapi_module.name -Rasmus On 03/31/2011 02:24 AM, Richard Quadling wrote: > Hi. > > From a CLI/CGI perspective, the following code returns the full path > of the php.exe file. > > DWORD len; >

[PHP-DEV] Determine the name of the PHP SAPI module.

2011-03-31 Thread Richard Quadling
Hi. >From a CLI/CGI perspective, the following code returns the full path of the php.exe file. DWORD len; char buf[MAX_PATH]; len = GetModuleFileName(NULL, buf, sizeof(buf)); buf[len] = '\0'; If PHP is loaded as a module, how do y