Re: Environment extract

From: Date: Tue, 27 Mar 2001 16:11:07 +0000
Subject: Re: Environment extract
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45735@lists.php.net to get a copy of this message
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" <costas@othermedia.com> To: <php-general@lists.php.net> 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#45735) next »