php文章列表分页代码怎么写?
$sql = "SELECT * FROM `links` WHERE `subdomain` != '' ORDER BY id desc LIMIT 100";
$rows = $db->getData($sql);
foreach($rows as $row)
{
echo '<li><a href="http://'.$row['subdomain'].'.abc.com/" title="'.$row['title'].'">'.$row['title'].'</a></li>';
}
class CCustomWidgets {
public static function Pager($totalPages, $pageNumber, $pageSize, $url, $displayNumber = 6) {
$baseUrl = (strpos($url, "?") === false) ? $url.'?page=' : $url.'&page=';
$pager = '<div class="pager"><ul>';
$prevPage = $pageNumber - 1;
if($prevPage > 0){
$pager .= '<li><a href="'.$baseUrl. $prevPage.'"><span class="pager-previous">?????