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 you determine the filename of the
module. I'm guessing the above code would return Apache or IIS (if
using ISAPI), etc.
Is there a global property available for this (or for the above code)?
Richard.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
#include "SAPI.h"
and then you will have the name in the global sapi_module struct:
sapi_module.name
-Rasmus
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 you determine the filename of the
module. I'm guessing the above code would return Apache or IIS (if
using ISAPI), etc.Is there a global property available for this (or for the above code)?
Richard.
#include "SAPI.h"
and then you will have the name in the global sapi_module struct:
sapi_module.name
-Rasmus
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 you determine the filename of the
module. I'm guessing the above code would return Apache or IIS (if
using ISAPI), etc.Is there a global property available for this (or for the above code)?
Richard.
Thank you.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY