1.代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<?php
$a=$_SERVER['HTTP_USER_AGENT'];
$b=__DIR__;
$c=PHP_VERSION;
$d=PHP_OS;
$e=__FILE__;
echo <<<for
<form>
<table border="1px" style="width:600px;margin: 120px auto;background: deepskyblue">
<tr>
<td></td>
</tr>
<tr>
<td width="120px">浏览器信息</td>
<td>$a</td>
</tr>
<tr>
<td width="120px">所在目录</td>
<td>$b</td>
</tr>
<tr>
<td width="120px">解析器版本</td>
<td>$c</td>
</tr>
<tr>
<td width="120px">操作系统</td>
<td>$d</td>
</tr>
<tr>
<td width="120px">绝对路径</td>
<td>$e</td>
</tr>
</table>
</form>
for;
?>
</body>
</html>
2.效果图