|
Posted by Andy Hassall on 11/19/31 11:26
On 10 Sep 2005 20:33:37 -0700, "weissborn@charter.net" <weissborn@charter.net>
wrote:
>I'm a php newbie. I have installed apache 2.0.54 and php 5.0.5 on my
>win2k box. However, it does not appear the php is working properly. I
>base this on the following code(which I got from a book):
The book is apparently quite old.
><?php
>$envs = array ("HTTP_REFERER", "HTTP_USER_AGENT", "REMOTE_ADDR",
> "REMOTE_HOST", "QUERY_STRING", "PATH_INFO");
>foreach ($envs as $env)
> print "$env: $GLOBALS[$env]<br>";
None of the above are set as globals in the default and recommended
configuration of PHP since PHP 4.2.0.
You (correctly) have register_globals disabled. See the manual for more
details.
The content you're after will be available from the $_SERVER array.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|