Environment Variables
| From: | Robert Morse | Date: | Fri, 09 Aug 2002 17:52:12 +0000 |
| Subject: | Environment Variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111872@lists.php.net to get a copy of this message | ||
Hello.
I have run into a weird problem with php. I have a very
short php script that will print out a particular environment
variable. Here is the contents of an index.php file:
<html><head><title>Test</title></head>
<body bgcolor="#FFFFFF">
<b> LOOK -- <? print($MY_VAR); ?></b>
</body></html>
Now, when I go to http://server/index.php, it prints
out my variable as I want.
LOOK -- MY Test Variable
But, when I just go to http://server/ (and I have index.php
as a directory index in the apache server config file)
the variable isn't set and all I get is:
LOOK --
Anybody have any ideas what may be causing this behavior?
Thanks in advance.
--
Bob Morse
Senior Systems Programmer
Brown University