时间:2021-07-01 10:21:17 帮助过:5人阅读
if($array){
rsort($array);//修改日期倒序排序
}
for($j=$imgnums*$page; $j<($imgnums*$page+$imgnums)&&$j<$i; ++$j){
echo '';
echo $array[$j],'
';
echo "
";
echo '';
}
$realpage = @ceil($i / $imgnums) - 1;
$Prepage = $page-1;
$Nextpage = $page+1;
if($Prepage<0){
echo "上一页 ";
echo "下一页 ";
echo "最末页 ";
}elseif($Nextpage >= $realpage){
echo "首页 ";
echo " 上一页 ";
echo " 下一页";
}else{
echo "首页 ";
echo "上一页 ";
echo "下一页 ";
echo "最末页 ";
}
?>
http://www.bkjia.com/PHPjc/740204.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/740204.htmlTechArticle 代码如下:div style="width: 90%; margin: 10px auto; border: 1px solid #ccc; text-align: center" ?php $page=isset($_GET['page'])?$_GET['page']:0;//从零开始 $img...