Date: 12/30/02
- Next message: philip <email protected>: "[PHP-DOC] #6513 [Opn->Csd]: get_browser() and register_globals"
- Previous message: stephan <email protected>: "[PHP-DOC] #21288 [Com]: PHP does referencing when i want to create a *copy* of an array of objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
philip Mon Dec 30 11:05:15 2002 EDT
Modified files:
/phpdoc/en/reference/misc/functions get-browser.xml
Log:
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.
Index: phpdoc/en/reference/misc/functions/get-browser.xml
diff -u phpdoc/en/reference/misc/functions/get-browser.xml:1.5 phpdoc/en/reference/misc/functions/get-browser.xml:1.6
--- phpdoc/en/reference/misc/functions/get-browser.xml:1.5 Sun Dec 29 23:57:52 2002
+++ phpdoc/en/reference/misc/functions/get-browser.xml Mon Dec 30 11:05:14 2002
@@ -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 @@
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>
@@ -100,6 +101,15 @@
enabled the browser to accept cookies or not. The only way to test if
cookies are accepted is to set one with <function>setcookie</function>,
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>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: philip <email protected>: "[PHP-DOC] #6513 [Opn->Csd]: get_browser() and register_globals"
- Previous message: stephan <email protected>: "[PHP-DOC] #21288 [Com]: PHP does referencing when i want to create a *copy* of an array of objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

