browscap.ini file and get_browser() aren't working

3.5k Views Asked by At

I removed the comment also from the php.ini in place of browscap but still it is not working.

php.ini configuration file

[browscap]
browscap = "/Applications/mamp/conf/php7.0.0/browscap.ini"

and my code

<?php
$bro=get_browser(null,true);
print_r($bro);
?>
1

There are 1 best solutions below

0
On BEST ANSWER

Today I phased this problem.

Just open the Applications/MAMP/bin/php/php7.1.1/conf/php.ini file and uncomment this line:

[browscap]
browscap = /Applications/MAMP/bin/php/browscap.ini

And finally restart the MAMP. get_browser() function will work.

Let me know if you solved this problem.