Ahh, that's the cause. Here's how to duplicate the error :-)
error_reporting(E_NOTICE);
foo();
function foo()
{
echo $HTTP_USER_AGENT;
}
As Mark mentioned, mind your scope. Regarding the error, I just posted
some information on this perhaps it'll be of some use :
http://mar
On Tue, 27 Mar 2001 17:31:25 +0100, Costas ([EMAIL PROTECTED])
wrote:
>when i try printing
>
>print $HTTP_USER_AGENT;
>
>I get the error message Undefined variable: HTTP_USER_AGENT
>
>have i missed a declaration of some sort or something else?
>
>thanks
Are you doing this from inside a function
g. You can include phpinfo() anywhere to see the output values of
> your script.
>
> Matt Friedman
>
>
>
> - Original Message -----
> From: "Costas" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 27, 2001 8:01 AM
> Subj
--
From: "Costas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 8:01 AM
Subject: [PHP] Environment extract
> In perl the code to extract browser info is:
> $length = $ENV{'HTTP_USER_AGENT'};
>
> What is the equivalent co
In perl the code to extract browser info is:
$length = $ENV{'HTTP_USER_AGENT'};
What is the equivalent code in PHP.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list admi
5 matches
Mail list logo