以前从来没有做过网页开发之内,由于此次项目突然要求需要有一个web配置界面,都没人会做,然后我就不幸的摊上这事了.现在遇到一个问题,还望大神帮忙解答一下,越详细越好!web架构:uhttp+mysql+php前端找人帮忙做的纯html页面,现在要把mysql里面的数据,显示到html页面上面现在有2个文件,Status.php和Status.html,我想在显示Status.html页面的时候,能够通过Status.php自动获取到数据库里面的值,显示到页面上
文件一:
Status.php
<?php
//读取数据库......
//假如我们取到了设备id
$sys_id="000001";
?>
文件二:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<link href="../css/main.css" rel="stylesheet">
</head><body marginwidth="0" marginheight="0">
<form action="StatusRpm.html" method="get">
<table>
<tbody>
<tr>
<td class="h1" colspan="3">系统信息</td>
</tr>
<tr>
<td class="blue" colspan="3"></td>
</tr>
<tr>
<td class="h2" colspan="3">系统状态</td>
</tr>
<tr>
<td class="Item">设备ID:</td>
<td><div>$sys_id</div></td>
</tr>
<tr>
<td class="Item">硬件版本:</td>
<td><div>$hardware_version</div></td>
</tr>
<tr>
<td class="Item">软件版本:</td>
<td><div>$software_version</div></td>
</tr>
<tr>
<td class="Item">系统运行状态:</td>
<td><div>$sys_status</div></td>
</tr>
<tr>
<td class="blue" colspan="3"></td>
</tr>
<tr>
<td class="h2" colspan="3">LAN口状态</td>
</tr>
<tr>
<td colspan="3"><table border="0">
<!-- 0不显示边框 -->
<tbody>
<tr>
<td class="ListTC2" width="30%">接口名</td>
<td class="ListTC2" width="30%">IP地址</td>
<td class="ListTC2">子网掩码</td>
<td class="ListTC2">网关</td>
</tr>
<tr>
<td class="ListC2">$eth_name</td>
<td class="ListC2">$ip</td>
<td class="ListC2">$netmask</td>
<td class="ListC2">$gateway</td>
</tr>
<tr>
<td class="ListC2">$eth_name</td>
<td class="ListC2">$ip</td>
<td class="ListC2">$netmask</td>
<td class="ListC2">$gateway</td>
</tr>
</tbody>
</table></td> </tr>
<tr>
<td class="blue" colspan="3"></td>
</tr>
<tr>
<td></td>
<td><input name="refresh" class="button" type="button" id="refresh" value="刷新" onclick="return doRefresh();"></td>
</tr>
</tbody>
</table>
</form> <script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript">
function doRefresh() {
location.href = "StatusRpm.html";
return true;
}
</script>
</body>
</html>如何才能在显示Status.html的时候,设备ID一栏,自动就显示的00001呢?求大神解答,最好直接帮我改出来,我对这个基本完全不懂.