作者 ZhengBing He

$serverAddress

1 <?php 1 <?php
2 // 输出服务器的本机地址 2 // 输出服务器的本机地址
3 -$serverAddress = $_SERVER['HTTP_HOST'];  
4 -echo "服务器的本机地址是:{$serverAddress}<br>"; 3 +//$serverAddress = $_SERVER['HTTP_HOST'];
  4 +//echo "服务器的本机地址是:{$serverAddress}<br>";
5 5
6 // 输出客户端的本机地址 6 // 输出客户端的本机地址
7 $clientAddress = $_SERVER['REMOTE_ADDR']; 7 $clientAddress = $_SERVER['REMOTE_ADDR'];