HTTP Environment Varialbles
| From: | Alex Shi | Date: | Thu, 06 Dec 2001 22:41:42 +0000 |
| Subject: | HTTP Environment Varialbles | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76959@lists.php.net to get a copy of this message | ||
Hi,
I have a question about how we can read environment variables. In perl we
can
do this as following:
$caller = $ENV{'HTTP_REFERER'};
$doc_name = $ENV{'DOCUMENT_NAME'};
$visitor_ip = $ENV{'REMOTE_ADDR'};
$visitor_host = $ENV{'REMOTE_HOST'};
Actually in Perl, either SSI or CGI, we can get all the environment
variables.
How can we do the same thing in PHP?
Alex