PHP使用$_SERVER["HTTP_USER_AGENT"] 判断
其值格式如下:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar) 如果是 MSIE 就 header("location: url");

解决方案 »

  1.   

    关闭浏览器不行,但是你可以给来个转向。
    <script>
    var ie = document.all ? 1 : 0
    if(!ie)location.href=""//要转向的地址。
    </script>
      

  2.   

    这是 Firefox 浏览器结果Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3判断其包含相应字串就行了
      

  3.   

    JS就如myvicy(看着远方,走脚下的路。) 方法
    <script>
    var ie = document.all ? 1 : 0
    if(!ie){
    alert("非IE浏览器");
    top.location = url;
    }
    </script>
      

  4.   


    var browser = navigator;
    var check_browser = browser.userAgent;
    if(check_browser.indexOf("MSIE")==-1){
        location.href='err.php';
    }
     
    不行啊
      

  5.   

    <script language="JavaScript">
    for(name in navigator) {
       document.write(name + ' : ' + navigator[name] + '<br>\n');
    }
    </script>
    上面代码测试浏览器,其中navigator.userAgent找到具体浏览器信息
    FireFox:
    userAgent : Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
    MSIE:
    userAgent : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
      

  6.   

    沙发的回答不错
    JavaScript方案不可取
    何必厚此薄彼,莫非收了微软的$
      

  7.   

    $_SERVER["HTTP_USER_AGENT"] 这个可以判断,不过这个是可以伪造的
      

  8.   

    这个变量本身就是浏览器发送出来的,firefox只要改改源码发送出来的 标头就是IE的```msie的一样可以改一下变成firefox`````如果要求一定辩认出来恐怕不可能````
      

  9.   

    if(document.all)
    如果是真就表示用的是IE浏览器
    否则就不是