Bujji
Bujji

Reputation: 1727

setting apache environment variable

My hosting environment using Server version: Apache/2.2.14 (Unix) and I am modifying ./usr/local/apache/conf/httpd.conf to set environment variable and restarting the server .

SetEnv XML-RPC-IPs 193.45.32.21

I did set it as a first entry in the file and restarted the server . But even restarting if I try to print it is still getting me black , Am I missing any thing ?

echo "My IP address ".$_SERVER['XML-RPC-IPs'];

Thanks for your help Regards Kiran

Upvotes: 0

Views: 3558

Answers (1)

Ayoola Falola
Ayoola Falola

Reputation: 11

Environmental Variables are located in $_ENV superglobal.

What you are looking for is echo "My IP address ".$_ENV['XML-RPC-IPs'];

Upvotes: 1

Related Questions