/**
* 检测用户当前浏览器
* @return boolean 是否ie浏览器
*/
function chk_ie_browser()
{
$userbrowser = $_SERVER['HTTP_USER_AGENT'];
//IE 6以前
if (preg_match('/MSIE/i', $userbrowser)) {
$usingie = true;
} else {
$usingie = false;
}
//IE 7 8 9 10 11,11的测试过可以使用
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE || strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE) {
// echo 'You are using Internet Explorer.<br />';
$usingie = true;
}
return $usingie;
}