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
""Matt Friedman"" <[EMAIL PROTECTED]> wrote in message
002701c0b6d8$88abb740$03284d18@mattq3h8budilr">news:002701c0b6d8$88abb740$03284d18@mattq3h8budilr...
> print $HTTP_USER_AGENT; // the variable is already in the global scope.
>
> also $ua = getenv('HTTP_USER_AGENT');
>
> Most variables are automatically made a part of the environment in a PHP
> script. It's one of the ways PHP makes scripting easier.
>
> The online manual is invaluable for this type of info. http://www.php.net/
>
> Also, write a short script and run it as so:
> <? phpinfo(); ?>
> You'll see a myriad of variables and their values. It's also handy for
> debugging. 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
> Subject: [PHP] Environment extract
>
>
> > 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 administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> --
> 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 administrators, e-mail: [EMAIL PROTECTED]
>
--
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 administrators, e-mail: [EMAIL PROTECTED]