how to detect internet explorer and firefox using PHP?

前端 未结 6 745
傲寒
傲寒 2021-01-29 09:05

how to detect internet explorer and firefox using PHP?

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-29 09:12

    If you need something just to put some HTML code (like different stylesheet attached) use something like that (instead of server-side code).

    
    

    Otherwise use the HTTP_ACCEPT solution because it is based on browser features not just name. Especially that a lot of IE-addons (and some spyware) change some parts of useragent.

提交回复
热议问题