我刚刚尝试启用 php_browscap.ini 以便我可以使用get_browser函数。
但是,它似乎显示了一个空数组?
$user_agent = get_browser(null, true);
print_r($user_agent);
在我的 php.ini 文件中,我有以下内容:
[browscap]
; http://php.net/browscap
browscap = C:/wamp/bin/php/php5.3.0/extra/php_browscap.ini
我可能错过了一些简单的东西?
更新
我得到的输出:
Array ( [browser_name_regex] => §^.*$§ [browser_name_pattern] => * [browser] => Default Browser [version] => 0 [majorver] => 0 [minorver] => 0 [platform] => unknown [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => [tables] => 1 [cookies] => [backgroundsounds] => [cdf] => [vbscript] => [javaapplets] => [javascript] => [activexcontrols] => [isbanned] => [ismobiledevice] => [issyndicationreader] => [crawler] => [cssversion] => 0 [supportscss] => [aol] => [aolversion] => 0 )