webignition/php-ie-detector

解析用户代理字符串以检测Internet Explorer

0.2 2018-04-19 16:58 UTC

This package is auto-updated.

Last update: 2024-09-05 18:59:24 UTC


README

解析用户代理字符串以检测Internet Explorer。

一种检测IE6、IE7或IE8的简单最小化方法。

用法

<?php

use webignition\IEDetector\IEDetector;

$ie6UserAgent = 'Mozilla/4.0 (MSIE 6.0; Windows NT 5.0)';

if (UserAgentDetector::isIE6()) {
    // ...
}