如何判断请求是从我的电脑到PHP页面的


how to judge the request is from my computer to the php page?

如何确定请求是否从我的计算机到php页面?

我想用print_r($GLOABALS)从我的计算机调试我的站点,但我不希望其他计算机这样做。

<?php
  // can not use ip to judge wheather this computer is mine 
  // for my ip will change always.
  if($is_my_computer){
    echo 'yes';
}

我想在你的本地机器你有你的网站在localhost/mylocalwebsite。如果是这样,只要检查一下你是否在这种环境中,就可以了。

<?php
  if($_SERVER['SERVER_NAME'] == 'localhost') {
    echo "foo";
  }