Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在浏览器版本上重定向_Php_Javascript_Html - Fatal编程技术网

Php 在浏览器版本上重定向

Php 在浏览器版本上重定向,php,javascript,html,Php,Javascript,Html,我已经设法找出它的IE7,然后重定向到某个页面。如果IE浏览器版本低于IE版本8,我想重定向到错误页面,该怎么办 <!--[if IE 7]> <script type="text/javascript"> window.location = "BrowserErrorPage.php"; </script> <![endif]--> 有关更多信息: 有条件的评论是一个糟糕的想法,但下面是它的工作原理。dup:还有:为什么这

我已经设法找出它的IE7,然后重定向到某个页面。如果IE浏览器版本低于IE版本8,我想重定向到错误页面,该怎么办


<!--[if IE 7]>
  <script type="text/javascript">
    window.location = "BrowserErrorPage.php";
  </script>
<![endif]-->
有关更多信息:



有条件的评论是一个糟糕的想法,但下面是它的工作原理。

dup:还有:为什么这是一个糟糕的想法。如果是这样,最好的解决方案是什么
<!--[if lt IE 8]>
  <script type="text/javascript">
    window.location = "BrowserErrorPage.php";
  </script>
<![endif]-->
<!--[if lt IE 8]>
  <script type="text/javascript">
    window.location = "BrowserErrorPage.php";
  </script>
<![endif]-->