What's the best way to detect a browser with php?

后端 未结 5 952
我在风中等你
我在风中等你 2021-01-21 08:13

Could anyone tell me the best way to detect a browser using php? IE 6 and 7 are terrible when it comes to achieving full browser compatibility with CSS so my site isn\'t going t

5条回答
  •  被撕碎了的回忆
    2021-01-21 08:42

    The Best way to detect the browser is to use the php class given below. i created this for my website a year ago. It works with chrome, firefox,opera and internet explorer.

      $name, 
                    'version'   => $version,
                ); 
            } 
        } 
        $browser = Browser::detect(); 
        echo 'You browser is '.$browser['name'].' version '.$browser['version']; 
        echo "
    "; ?>

提交回复
热议问题