一、下載 class/PageBar.php 至 class/ 底下
二、使用
#----請插入在$sql 與 $result 之間 include_once WEB_PATH."/class/PageBar.php"; $pageCount = 10; $pageList = 10; $PageBar = getPageBar($db, $sql, $pageCount, $pageList); $bar = $PageBar['bar']; $sql = $PageBar['sql']; $total = $PageBar['total']; $bar = ($total > $pageCount) ?$bar:""; $smarty->assign("bar", $bar);//送至樣板 #---------------------------------------------------------