Re: Environment variables and class
| From: | Rasmus Lerdorf | Date: | Fri, 23 Jun 2000 09:33:56 +0000 |
| Subject: | Re: Environment variables and class | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22046@lists.php.net to get a copy of this message | ||
> i'm trying to use the HTTP_USER_AGENT from within a class..
> I just put in one of the method a simple print($HTTP_USER_AGENT) to
> display it when i call the method...it doesn't work !
>
> any idea?
Put:
global $HTTP_USER_AGENT;
at the top of your function/method
-Rasmus