Firefox v.25的get_browser標識是否存在問題?這是一個簡單的代碼:Firefox v.25的瀏覽器標識(get_browser)
echo $_SERVER['HTTP_USER_AGENT'] . "<br>";
$browser = get_browser(null, true);
print_r($browser);
它爲除Firefox以外的所有瀏覽器返回正確的信息。對於Firefox我得到以下輸出:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Array (
[browser_name_regex] => §^.*$§
[browser_name_pattern] => *
[comment] => Default Browser
[browser] => Default Browser
[version] => 0.0
[majorver] => 0
[minorver] => 0
[platform] => unknown
[platform_version] => unknown
[alpha] =>
[beta] =>
[win16] =>
[win32] =>
[win64] =>
[frames] =>
[iframes] =>
[tables] =>
[cookies] =>
[backgroundsounds] =>
[javascript] =>
[vbscript] =>
[javaapplets] =>
[activexcontrols] =>
[ismobiledevice] =>
[issyndicationreader] =>
[crawler] =>
[cssversion] => 0
[aolversion] => 0
)
我在這裏丟失了什麼?我有最新的browscap.ini從2013年七月
感謝
更新。我不得不手動更新browscap.ini,因爲它錯過了最新的Firefox 25定義。
這看起來好像完全按照預期工作。話雖如此,我仍然不明白這個問題。 – Ohgodwhy
Gecko/20100101 Firefox/25.0 - 這有什麼問題? – DevlshOne
所有字段爲空。 Gecko/20100101 Firefox/25.0不是來自「get_browser」,而是來自$ _SERVER ['HTTP_USER_AGENT']。 get_browser命令返回所有空字段 – user2723490