Nicholas Wild Nicholas Wild - 6 months ago 63
PHP Question

How should I be setting browscap.ini file

Possible Duplicate:

Change to php.ini does not have effect

I downloaded the browscap.ini file and then pasted it to the directory "C:\wamp\bin\php\php5.4.3\extras" and i went to php.ini file and made these changes there:

browscap = extras/browscap.ini

and then i restarted the server, and typed the following code into temp.php file:

echo $_SERVER['HTTP_USER_AGENT'] . "<br><br>";

$browser = get_browser(null, true);

now the output is like:

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4

Warning: get_browser(): browscap ini directive not set in C:\wamp\www\functions\browser.php on line 4

am i missing something? please provide some solution, and sorry if i am unable to make you understand


You are to use the Full PATH and restart your server when you are done


browscap = "C:\xampp\php\extras\browscap.ini"