<li><a href="admin.php">偶要管理</a></li>
<?}?>
</ul>
</div>
<div id="head_r">银子留言板 Version 1.0</div>
</div>
3、footer.php(公用底部文件)
<?php
$counterFile="conter.xml";
function displayCounter($counterFile){
$fp = fopen($counterFile,"rw");
$num = fgets($fp,5);
$num += 1;
print "<div id=\"footer\"> 银 子 留 言 板 Version 1.0 您 是 第
"."$num"." 位无聊的银</div>";
exec("rm -rf $counterFile");
exec("echo $num > $counterFile");
}
if(!file_exists($counterFile)){
exec("echo 0 > $counterFile");
}
displayCounter($counterFile);
?>
</body>
</html>
4、index.php(首页)
<?php
require_once("conn.php");
require_once("header.php");
session_start();
//分页代码开始
$pagesize = 10;//设置每页显示条数
$rs = mysql_query("select count(*) from lo");//取得记录总数,计算总页数用
$myrow = mysql_fetch_array($rs);
$numrows = $myrow[0];//计算总记录