1¡¢
Ê×ÏÈÈ¥http://pear.php.net/package/Pager ÏÂÔØ Pager°ü£ºPager-2.4.8.tgz
£»
2¡¢
½âѹµ½×Ô¼ºµÄ¹¤×÷Ŀ¼
3¡¢
ʾÀýÈçÏ£º
<?php
require_once('Pager/Pager.php');
$params = array(
'itemData' => $re, //Òª½øÐзÖÒ³µÄ½á¹ûÊý×é
'perPage' => 12, //ÿҳµÄ¼Ç¼Êý
'delta' => 8, //ÿҳÏÔʾµÄÒ³ÂëÊý
'append' => true,//Ò³ÂëÔÚurl´«µÝ
'clearIfVoid' => false,//µ¥Ò³ÊÇ·ñÏÔʾҳÂë
'urlVar' => 'entrant',//´«µÝÒ³ÂëµÄ±äÁ¿Ãû
'useSessions' => true,
'closeSession' => true,
'mode' => 'Jumping', //Ò³ÂëÏÔʾ·½Ê½
'prevImg' => 'ÉÏÒ»Ò³',
'nextImg' => 'ÏÂÒ»Ò³',
'firstPagePre' => '',
'firstPageText'=> 'µÚÒ»Ò³',
'firstPagePost'=> '...',
'lastPagePre' => '...',
'lastPageText' => '×îÄ©Ò³',
'lastPagePost' => '',
'altPrev' => 'ÉÏÒ»Ò³',
'altNext' => 'ÏÂÒ»Ò³',
'altPage' => '',
'curPageLinkClassName'=> 'current', //µ±Ç°Ò³Ò³ÂëÏÔʾÑùʽ
);
if (isset($_REQUEST['sort'])) $params['extraVars'] = array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']); //urlÌí¼ÓÆäËûµÄ²ÎÊý
$pager = & Pager::factory($params);
$page_data = $pager->getPageData();//·ÖÒ³½á¹û
$links = $pager->getLinks();//Ò³ÂëÁ¬½Ó
?>
½ñÌìÕæÊǵ¹Ã¹µÄÈÕ×Ó£¬ºÁ²»ÈÝ×öºÃµÄÍøÕ¾ÉÏ´«µ½Ftp¡£¾ÓÈ»ÎÞ·¨Ê¹Óá£ÏÖÏóΪphpÒ³Ãæʲô¶¼ÏÔʾ²»³öÀ´¡£µ«ÊÇÔÚÎÒ±¾µØÈ·ÊǺúõġ£ ÄѵÀͬÑùµÄ¶«Î÷ÉÏ´«µ½FTPÉÏ»áÓÐÎÊÌâÂ𣿠¾¹ýÎÒ½«½üÈý¸öСʱµÄµ÷²é£¬ÖÕÓڲ鴦ÁËÔÒò¡£ ÔÀ´ һЩ utf-8¸ñʽµÄÎļþ¼ÓÁËBOM¡£Õâ¸öBOM¿É²»ÊǸöºÃ¶«Î÷¡£»á¸ãµÃ¼¸¸ö±à¼Æ÷ Éñ»êµßµ¹µÄ¡£×îÖ±½ÓµÄ±íÏÖ¾ ......