isApache() and isIIS() functions for PHP
A couple quick little functions for when you need to know if you're running on Apache or IIS.
PLAIN TEXT
PHP:
function isApache()
{
return ((bool) preg_match('/Apache/i', $_SERVER['SERVER_SOFTWARE']));
}
function isIIS()
{
return ((bool) preg_match('/IIS/i', $_SERVER['SERVER_SOFTWARE']));
}
isApache() will return true if it's running on an Apache server and false if not. [...]