Link to home
Start Free TrialLog in
Avatar of led_zephrylin
led_zephrylin

asked on

Help with PHP Env Variables

Hi, I'm trying to write a page that logs user details such as the user's IP address and so on. When I try to output an environment vairable to the screen (to test the page), nothing gets printed out. I have tried various combinations such as:
echo $REMOTE_ADDR;
echo getenv("REMOTE_ADDR");
echo $_ENV['REMOTE_ADDR'];
print "Addr: $REMOTE_ADDR";
And so on. These variables are displayed when i call the phpinfo() method from my page. I tried using ASP to output the variables, and that seems to work fine. I'd rather use PHP tho, so if anyone can help, that'd be great! :)
Cheers,
Darren.
ASKER CERTIFIED SOLUTION
Avatar of jkna_gunn
jkna_gunn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial