index.php 280 字节
<?php
// 输出服务器的本机地址
$serverAddress = $_SERVER['SERVER_ADDR'];
echo "服务器的本机地址是:{$serverAddress}<br>";

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