demo

    header("Content-Type:text/html;charset=utf-8");
include "page.class.php";

$link=mysql_connect("localhost", "root", "");

mysql_select_db("bbs");


$result=mysql_query("select * from content");


$total=mysql_num_rows($result);

$num=5;

$page=new Page($total, $num, "&cid=99");

$sql="select * from content {$page->limit}";

$result=mysql_query($sql);

echo '';
echo '';

while($row=mysql_fetch_assoc($result)){
echo '';
echo '';
echo '';
echo '';
echo '';

echo '';
}

echo '';
echo '

SHOPS

'.$row["id"].' '.$row["user"].' '.$row["content"].' '.$row["title"].'
'.$page->fpage(array(8,3,4,5,6,7,0,1,2)).'
';

你可能感兴趣的:(demo)