<!DOCTYPE html>
<html>
<body>
<?php
$t = date("H");
echo "<p>(服务器)当前时间是 " . $t;
echo ",将显示以下消息:</p>";
if ($t < "10") {
echo "早上好!";
} elseif ($t < "20") {
echo "白天愉快!";
} else {
echo "晚上好!";
}
?>
</body>
</html>