mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Made existence of browscap.ini a little more clear, noted when register_globals
affected it which closes bug #6513, and fixed typo as this still returns an object. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@109400 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
124c4eaafc
commit
c5d1730735
1 changed files with 16 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.get-browser">
|
||||
<refnamediv>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>get_browser</methodname>
|
||||
<type>object</type><methodname>get_browser</methodname>
|
||||
<methodparam choice="opt"><type>string</type><parameter>user_agent</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<function>get_browser</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
The information is returned in an array, which will contain
|
||||
The information is returned in an <type>object</type>, which will contain
|
||||
various data elements representing, for instance, the browser's
|
||||
major and minor version numbers and ID string; &true;/false values
|
||||
for features such as frames, JavaScript, and cookies; and so
|
||||
|
@ -88,9 +88,10 @@ Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr />
|
|||
In order for this to work, your <link
|
||||
linkend="ini.browscap">browscap</link> configuration setting in
|
||||
&php.ini; must point to the correct location of the
|
||||
<filename>browscap.ini</filename> file on your system. An up-to-date
|
||||
<filename>browscap.ini</filename> file can be located
|
||||
<ulink url="&url.browscap.download;">here</ulink>. By default, this
|
||||
<filename>browscap.ini</filename> file on your system.
|
||||
<filename>browscap.ini</filename> is not bundled with PHP but you
|
||||
may find an up-to-date <ulink url="&url.browscap.download;">
|
||||
browscap.ini file here</ulink>. By default, the
|
||||
<link linkend="ini.browscap">browscap</link> directive is commented out.
|
||||
</simpara>
|
||||
<note>
|
||||
|
@ -102,6 +103,15 @@ Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr />
|
|||
reload, and check for the value.
|
||||
</simpara>
|
||||
</note>
|
||||
<note>
|
||||
<simpara>
|
||||
On versions older than PHP 4.0.6, you will have to pass the
|
||||
user agent in via the optional <parameter>user_agent</parameter>
|
||||
parameter if the PHP directive <link linkend="ini.register-globals">
|
||||
register_globals</link> is <literal>off</literal>. In this case,
|
||||
you will pass in <varname>$HTTP_SERVER_VARS['HTTP_USER_AGENT']</varname>.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue