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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php