- 論壇徽章:
- 0
|
以前從來沒有做過網(wǎng)頁開發(fā)之內(nèi),由于此次項(xiàng)目突然要求需要有一個(gè)web配置界面,都沒人會(huì)做,然后我就不幸的攤上這事了.現(xiàn)在遇到一個(gè)問題,還望大神幫忙解答一下,越詳細(xì)越好!
web架構(gòu):uhttp+mysql+php
前端找人幫忙做的純html頁面,現(xiàn)在要把mysql里面的數(shù)據(jù),顯示到html頁面上面
現(xiàn)在有2個(gè)文件,Status.php和Status.html,我想在顯示Status.html頁面的時(shí)候,能夠通過Status.php自動(dòng)獲取到數(shù)據(jù)庫里面的值,顯示到頁面上
文件一:
Status.php
<?php
//讀取數(shù)據(jù)庫......
//假如我們?nèi)〉搅嗽O(shè)備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">系統(tǒng)信息</td>
</tr>
<tr>
<td class="blue" colspan="3"></td>
</tr>
<tr>
<td class="h2" colspan="3">系統(tǒng)狀態(tài)</td>
</tr>
<tr>
<td class="Item">設(shè)備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">系統(tǒng)運(yùn)行狀態(tài):</td>
<td><div>$sys_status</div></td>
</tr>
<tr>
<td class="blue" colspan="3"></td>
</tr>
<tr>
<td class="h2" colspan="3">LAN口狀態(tài)</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">子網(wǎng)掩碼</td>
<td class="ListTC2">網(wǎng)關(guān)</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的時(shí)候,設(shè)備ID一欄,自動(dòng)就顯示的00001呢?求大神解答,最好直接幫我改出來,我對這個(gè)基本完全不懂. |
|