Re: ISAPI vs CGI
| From: | Gerard Samuel | Date: | Wed, 23 Jun 2004 14:15:20 +0000 |
| Subject: | Re: ISAPI vs CGI | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188872@lists.php.net to get a copy of this message | ||
On Wednesday 23 June 2004 05:08 am, Jason Wong wrote:
> On Wednesday 23 June 2004 16:42, Vincent DUPONT wrote:
> > I have a script that need to run on ISAPI module on one server and on CGI
> > on anther server. I would like my code to be able to react differently
> > depending on the CGI/ISAPI mode.
> >
> > How can I detect the running mode of PHP??
> > is there a $_SERVER variable or anything??
>
> I don't know. But you've asked the right question. Take it a step further
> by doing
>
> print_r($_SERVER);
>
> on both servers and see if there's something you can use to differentiate
> the two.
>
You can use the function php_sapi_name().
It tells how php is connected to the webserver..
Very useful.