Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php google baidu ·ÖÒ³

php google baidu ·ÖÒ³
<?php
/**
×÷Õߣº
äìÏ沩¿Í http://blog.csdn.net/fkedwgwy
ʱ¼ä£º
2009-11-26
php¼¼ÊõȺ£º
37304662
ʹÓ÷½·¨£º
include_once'Pager.class.php';
$pager=new Pager();
if(isset($_GET['page']))
$pager->setCurrentPage($_GET['page']);
else
$pager->setCurrentPage(1);
$pager->setRecorbTotal(1000);
$pager->setBaseUri("page.php?");
echo $pager->execute();
**/
class Pager{
/**
*int×ÜÒ³Êý
**/
protected $pageTotal;
/**
*intÉÏÒ»Ò³
**/
protected $previous;
/**
*intÏÂÒ»Ò³
**/
protected $next;
/**
*intÖмäÒ³ÆðʼÐòºÅ
**/
protected $startPage;
/**
*intÖмäÒ³ÖÕÖ¹ÐòºÅ
**/
protected $endPage;
/**
*int¼Ç¼×ÜÊý
**/
protected $recorbTotal;
/**
*intÿҳÏÔʾ¼Ç¼Êý
**/
protected $pageSize;
/**
*intµ±Ç°ÏÔʾҳ
**/
protected $currentPage;
/**
*string»ùurlµØÖ·
**/
protected $baseUri;
/**
*@returnstring»ñÈ¡»ùurlµØÖ·
*/
public function getBaseUri(){
return$this->baseUri;
}
/**
*@returnint»ñÈ¡µ±Ç°ÏÔʾҳ
*/
public function getCurrentPage(){
return $this->currentPage;
}
/**
*@returnint»ñȡÿҳÏÔʾ¼Ç¼Êý
*/
public function getPageSize(){
return $this->pageSize;
}
/**
*@returnint»ñÈ¡¼Ç¼×ÜÊý
*/
public function getRecorbTotal(){
return$this->recorbTotal;
}
/**
*@paramstring$baseUriÉèÖûùurlµØÖ·
*/
public function setBaseUri($baseUri){
$this->baseUri=$baseUri;
}
/**
*@paramint$currentPageÉèÖõ±Ç°ÏÔʾҳ
*/
public function setCurrentPage($currentPage){
$this->currentPage=$currentPage;
}
/**
*@paramint$pageSizeÉèÖÃÿҳÏÔʾ¼Ç¼Êý
*/
public function setPageSize($pageSize){
$this->pageSize=$pageSize;
}
/**
*@paramint$recorbTotalÉèÖûñÈ¡¼Ç¼×ÜÊý
*/
public function setRecorbTotal($recorbTotal){
$this->recorbTotal=$recorbTotal;
}
/**
*¹¹Ô캯Êý
**/
public function __construct()
{
$this->pageTotal=0;
$this->previous=0;
$this->next=0;
$this->startPage=0;
$this->endPage=0;
$this->pageSize=20;
$this->currentPage=0;
}
/


Ïà¹ØÎĵµ£º

³õѧPHPµÄ18¸ö»ù´¡Àý³Ì

 
ÈçºÎ´´½¨ÎÒÃǵĵÚÒ»¸öPHPÒ³ÃæÄØ£¿·Ç³£¼òµ¥µÄ£¡Ñ¡ÔñÎÒÃÇʹÓõÄÒ»¸ö×îºÃµÄÉè¼Æ¹¤¾ß£¬µ±È»ÄãÒ²¿ÉÒÔ Ö»Ê¹ÓüÇʱ¾¡£´´½¨Ö®ºó¼ÇµÃÒª±£´æΪÀ©Õ¹ÃûΪPHPµÄÎļþ£¬È»ºó´«µ½ÎÒÃǵķþÎñÆ÷
ÉÏ¡£
¡¡¡¡ÔÚ±àдPHP³ÌÐò֮ǰͨ³£ÎÒÃÇÐèÒªÅäÖÃÎÒÃǵĻ·¾³£¬Ò²¾ÍÊÇ˵·þÎñÆ÷
ÒªÖ§³ÖPHP²ÅÄÜÐа¡
¡¡¡¡Ò»¡¢PHPµÄ»ù±¾½á¹¹£º
¡¡¡¡Ê¹ÓÃIncl ......

PHP ¶à×Ö½Ú×Ö·û´®ºÍ×Ö·û¼¯

// ÎÒ¿´¹ýµÄÁ½±¾Êé PHP µÄÊéÖÐÌá¼°µ½ PHP6 µÄÐÂÌØÐÔ£¬ÆäÖÐÁ½¸öÊÇ namespace ºÍ unicode£¬
// ´Ó PHP5.3 ¿ªÊ¼£¬php ÒѾ­Ö§³Ö namespace ÁË; ¶ø Unicode ÔÚ PHP5.3 Öл¹Ã»Óз¢²¼¡£
//
// ¿´Êé¿´µ½ PHP µÄ¶à×Ö½Ú´¦Àí£¬Ï뵽ǰ¶Îʱ¼ä»¹»á×Ô¼º½ØÈ¡ ÖÐÓ¢»ìºÏµÄ×Ö·û´®£¬ÄÇʱºò»¨Á˺ܳ¤Ê±¼äÀ´¿´ utf£­8£¬
// gbk, gb2312, gb180 ......

[ת]UbuntuÏÂphp¿ª·¢»·¾³ÅäÖÃ(XAMPP)

UbuntuÎÞÒÉÊÇlinux³õѧÕßµÄÊ×Ñ¡°æ±¾£¬ÒòΪËüͼÐνçÃæÖ§³ÖµÄ·Ç³£ºÃ¡£
È»¶øxammpÊÇphp³õѧÕßµÄÊ×Ñ¡¡£
1.ʲôÊÇxammp?
XAMPP£¨Apache+MySQL+PHP+PERL£©ÊÇÒ»¸ö¹¦ÄÜÇ¿´óµÄ½¨Õ¾¼¯³ÉÈí¼þ°ü¡£Õâ¸öÈí¼þ°üÔ­À´µÄÃû×ÖÊÇLAMPP£¬µ«ÊÇΪÁ˱ÜÃâÎó½â£¬×îеļ¸¸ö°æ±¾¾Í¸ÄÃûΪ XAMPP ÁË¡£Ëü¿ÉÒÔÔÚWindows¡¢Linux¡¢SolarisÈýÖÖ²Ù×÷ϵͳÏ°² ......

¼ÌÐøÕª³­£º½ÌÄãÓÃPHPдMySQLÊý¾Ý¿âµÄÓû§ÈÏ֤ϵͳ

Óû§ÈÏÖ¤µÄÔ­ÀíºÜ¼òµ¥£ºÊ×ÏÈÐèÒªÓû§ÔÚÒ³ÃæÉÏÌîÈëÓû§ÃûºÍÃÜÂ룬µ±È»Ã»×¢²áµÄÓû§ÐèÒªÏÈ×¢²á¡£È»ºóµ÷ÓÃÊý¾Ý¿âËÑË÷ÊÇ·ñÓÐÏàÓ¦µÄÓû§¡£Èç¹ûÓоÍÈ·ÈÏ£¬Ã»ÓÐÔòÌáÐÑÓû§ÏÈ×¢²á¡£Ê¹ÓÃPHPÀ´Íê³ÉÕâÒ»Çкܼòµ¥£¬µ«ÐèҪעÒâµÄÊÇÈç¹ûÏëÔÚÒÔºóµÄÒ³ÃæÖж¼ÄÜÈ·ÈÏÓû§Éí·Ý¡£
µÚÒ»²½ÊÇ×öÒ»¸öµÇ¼µÄÒ³Ãæ¡£
µÚ¶þ²½¿ªÊ¼µÇ¼ºóµÄÈ·ÈϳÌÐòµÄÉ ......

PHPÊý×éµÄ×ܽá

 
Ò»¡¢Ê²Ã´ÊÇÊý×é
Êý×é¾ÍÊÇÒ»×éÊý¾ÝµÄ¼¯ºÏ£¬°ÑһϵÁÐÊý¾Ý×éÖ¯ÆðÀ´£¬ÐγÉÒ»¸ö¿É²Ù×÷µÄÕûÌå¡£Êý×éµÄÿ¸öʵÌ嶼°üº¬Á½Ï¼üºÍÖµ¡£
¶þ¡¢ÉùÃ÷Êý¾Ý
ÔÚPHPÖÐÉùÃ÷Êý×éµÄ·½Ê½Ö÷ÒªÓÐÁ½ÖÖ£ºÒ»ÊÇÓ¦ÓÃarray()º¯ÊýÉùÃ÷Êý×飬һÊÇÖ±½ÓΪÊý×éÔªËظ³Öµ¡£
<1>array()º¯ÊýÉùÃ÷µÄÊý×éµÄ·½Ê½array([mixed...]) ²ÎÊýmixedµÄÓ﷨Π......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ