作者 ZhengBing He

$serverAddress

<?php
// 输出服务器的本机地址
$serverAddress = $_SERVER['HTTP_HOST'];
echo "服务器的本机地址是:{$serverAddress}<br>";
//$serverAddress = $_SERVER['HTTP_HOST'];
//echo "服务器的本机地址是:{$serverAddress}<br>";
// 输出客户端的本机地址
$clientAddress = $_SERVER['REMOTE_ADDR'];
... ...