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?
. . . . . . . . . . . . . . . . . . . . . .
中國(guó)推廣網(wǎng) :http://bbs.iaozi.com
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?
<?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瀏覽器!'; ?}