envtest.php
1 2 3 |
<span class="cp"><?php</span> <span class="k">echo</span> <span class="nb">getenv</span><span class="p">(</span><span class="s1">'REMOTE_ADDR'</span><span class="p">);</span> <span class="cp">?></span> |
動作確認
1 |
$ export REMOTE_ADDR=1.1.1.1 |
1 2 |
$ php envtest.php 1.1.1.1 |