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

后端 未结 5 954
我在风中等你
我在风中等你 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:59

    You can only reliably detect the browser user-agent using Javascript. For PHP, you have to rely on the contents of the $_SERVER['HTTP_USER_AGENT'].

提交回复
热议问题