/數(shù)據(jù)庫(kù)列表顯示
public function backup(){
$db = M();
$data = $db->query("SHOW TABLE STATUS");
$count = count($data);
for($i = 0;$i < $count; $i ++){
$kmb += $data[$i]["data_length"];
}
$kmb = round($kmb/1024/1024,2);
$this->assign("kmb",$kmb);//當(dāng)前數(shù)據(jù)庫(kù)所占空間
$this->assign("data",$data);
$this->display();
}
<table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
<form name="myform" method="post">
<tr>
<th align="left">數(shù)據(jù)表名</th>
<th align="center">類型</th>
<th align="center">記錄數(shù)</th>
<th align="center">數(shù)據(jù)</th>
<th align="center">索引</th>
<th align="center">編碼</th>
</tr>
<empty name="data"><tr><td colspan="6" align="center">暫無(wú)數(shù)據(jù)表信息記錄</td></tr></empty>
<volist name="data" id="vo">
<tr>
<td align="left">{$vo["name"]}</td>
<td align="center">{$vo["engine"]}</td>
<td align="center">{$vo["rows"]}</td>
<td align="center">{$vo["data_length"]/1024|round=###,2}KB</td>
<td align="center">{$vo["index_length"]}</td>
<td align="center">{$vo["collation"]}</td>
</tr>
<olist>
<tr>
<td colspan="7" align="right">數(shù)據(jù)庫(kù)占用 {$kmb} MB </td>
</tr>
<!--
<tr>
<td colspan="7" align="center">分卷備份設(shè)置</td>
</tr>
<tr>
<td colspan="7" align="center">
文件名:<input type="text" class="inpMain" name="file_name" value="D20160226T220644" size=30>
每個(gè)分卷文件大?。?lt;input type="text" class="inpMain" name="vol_size" value="2048" size="5"> KB
</td>
</tr>
<tr>
<td height="26" colspan="7">
<input type="hidden" name="token" value="82ace968" />
<input type="hidden" name="totalsize" value="118">
<input type="submit" name="submit" class="btn" value="確定備份" onClick="{:U('Dbsavep')}">
</td>
</tr> -->
</form>
</table>