Use php to detect whether the browser the user is currently using is IE
- 2020-11-20 06:02:18
- OfStack
/**
* Detects the user's current browser
* @return boolean Whether or not ie The browser
*/
function chk_ie_browser() {
$userbrowser = $_SERVER['HTTP_USER_AGENT'];
if ( preg_match( '/MSIE/i', $userbrowser ) ) {
$usingie = true;
} else {
$usingie = false;
}
return $usingie;
}