Re: HTTP Problems
| From: | Daniel Beulshausen | Date: | Fri, 18 Aug 2000 14:22:13 +0000 |
| Subject: | Re: HTTP Problems | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1956@lists.php.net to get a copy of this message | ||
> It is at home, but it is copied straight from an OReilly book, and the
other
> examples there all work (except the HTTP ones)
>
> I think it is <? echo $HTTP_BROWSER ?>
ah yeah, now it's getting clear.
advice: do never touch environment variables like that (this one doesn't
even exist)
always get the via getenv();
http://www.php.net/manual/function.getenv.php
otherwise they can be overwritten by your users:
<?
print $HTTP_USER_AGENT;
print "<br>";
print getenv("HTTP_USER_AGENT");
?>
and then call it via file.php?HTTP_USER_AGENT=not_available
you'll see the difference.
greetings
daniel
/*--
daniel beulshausen - daniel@php4win.de
using php on windows? http://www.php4win.de