I am working on PHP 5.4.12 and I was trying to use get_browser();
function.
But it is not working at all.
I am getting the following error:
"Warning: get_browser(): browscap ini directive not set in C:\wamp\www\myfirstfile.php on line 4"
I first used browscap.ini
present on my PC, then download one named php_browscap.ini
, but both didn't work.
I am using wamp as my localhost. I set the location of browscap file in php.ini
file:
[browscap]
; http://php.net/browscap
;browscap = "C:\wamp\bin\php\php5.4.12\php_browscap.ini"
Still it gives me that error I mentioned above.
My code:
<?php
$browser = get_browser(null,true);
print_r($browser);
?>