简体   繁体   中英

Detect Internet Explorer from PHP (version 11 too)

What is the correct way to detect Internet Explorer in PHP, any version, including IE 11?

Tried:

f(!(isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false || 
   strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))){

The above does not work for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM