這個分頁函數很高只能的
看看就知道了
function ppage($total, $page, $e_page = 15, $e_block = 10, $url = '', $color = '') {
if(!strpos($url,'?'))
$url.='?';
else
$url.='&';
if($color '') {
$color ='';
$colore = '';
}
$colore = '';
}
$iltotalpage = ceiltotalpage = ceiltotalpage = ceiltotalpage = ceiltotalpage = ceiltotalpage = ceiltotalpage = ce ($total/$e_page); //頁數
$p_block = ceil($totalpage/$e_block); //區塊數目
$n_block
$start = ($n_block-1)*$e_block 1;
$ended = $n_block*$e_block; if($ended>$total) if($n_block>1) {
$link = $start-1;
$head ='.$ color.'[ ';
}
if($n_block $link = ''.$color.'[=>]'.$colore.'';
}
for($i=$start;$i $middle .=''.$color .'['.$i.']'.$colore.' ';
}
return $head.$middle.$foot;
}
以下是取得當前url的方法
function geturl() {
$headers = getallheaders();
$url = 'http://'.$headers['Host'].$SCRIPT_NAME;
return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> return $🎜> 返回 $ url;
}
http://www.bkjia.com/PHPjc/315917.html