亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

How to prevent IE browser from accessing my website? How to write the code to prohibit IE browser?
**推廣網(wǎng)
**推廣網(wǎng) 2018-10-30 13:14:51
0
4
2072

The website does not support the IE browser. How can I prompt users who use the IE browser to change the browser or directly prompt that the IE browser is not supported?

How to prohibit IE browser from accessing my website? How to write the code to prohibit IE browser?


. . . . . . . . . . . . . . . . . . . . . .

**推廣網(wǎng)
**推廣網(wǎng)

中國(guó)推廣網(wǎng) :http://bbs.iaozi.com

reply all(3)
BestModer

Two methods:

One is to judge the browser of the current request on the server side, otherwise it returns false

The second is to judge through the front-end js code

The specific code can be searched on Baidu


丁合超

It's no use. Why did you mess up the layout?

  • reply Baidu identifies browsers with a bunch of solutions
    胤彬- author 2018-10-31 15:50:04
胤彬-
<?php
/**?
*?檢測(cè)用戶當(dāng)前瀏覽器?
*?@return?boolean?是否ie瀏覽器?
*/?
function?chk_ie_browser()?{?
$userbrowser?=?$_SERVER['HTTP_USER_AGENT'];?
if?(?preg_match(?'/MSIE/i',?$userbrowser?)?)?{?
$usingie?=?true;?
}?else?{?
$usingie?=?false;?
}?
return?$usingie;?
}?
$i=chk_ie_browser();
if($i==true){
echo'你用的是IE瀏覽器!';
}else{
?echo'你用的不是IE瀏覽器!';
?}


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template