php·ÖÒ³Àà
<?php
class SubPages{
private $each_disNums;//ÿҳÏÔʾµÄÌõÄ¿Êý
private $nums;//×ÜÌõÄ¿Êý
private $current_page;//µ±Ç°±»Ñ¡ÖеÄÒ³
private $sub_pages;//ÿ´ÎÏÔʾµÄÒ³Êý
private $pageNums;//×ÜÒ³Êý
private $page_array = array();//ÓÃÀ´¹¹Ôì·ÖÒ³µÄÊý×é
private $subPage_link;//ÿ¸ö·ÖÒ³µÄÁ´½Ó
private $subPage_type;//ÏÔʾ·ÖÒ³µÄÀàÐÍ
/*
__constructÊÇSubPagesµÄ¹¹Ô캯Êý£¬ÓÃÀ´ÔÚ´´½¨ÀàµÄʱºò×Ô¶¯ÔËÐÐ.
@$each_disNums ÿҳÏÔʾµÄÌõÄ¿Êý
@nums ×ÜÌõÄ¿Êý
@current_num µ±Ç°±»Ñ¡ÖеÄÒ³
@sub_pages ÿ´ÎÏÔʾµÄÒ³Êý
@subPage_link ÿ¸ö·ÖÒ³µÄÁ´½Ó
@subPage_type ÏÔʾ·ÖÒ³µÄÀàÐÍ
µ±@subPage_type=1µÄʱºòΪÆÕͨ·Öҳģʽ
example£º ¹²4523Ìõ¼Ç¼,ÿҳÏÔʾ10Ìõ,µ±Ç°µÚ1/453Ò³ [Ê×Ò³] [ÉÏÒ³] [ÏÂÒ³] [βҳ]
µ±@subPage_type=2µÄʱºòΪ¾µä·ÖÒ³Ñùʽ
example£º µ±Ç°µÚ1/453Ò³ [Ê×Ò³] [ÉÏÒ³] 1 2 3 4 5 6 7 8 9 10 [ÏÂÒ³] [βҳ]
*/
function __construct($each_disNums,$nums,$current_page,$sub_pages,$subPage_link,$subPage_type){
$this->each_disNums=intval($each_disNums);
$this->nums=intval($nums);
if(!$current_page){
$this->current_page=1;
}else{
$this->current_page=intval($current_page);
}
$this->sub_pages=intval($sub_pages);
$this->pageNums=ceil($nums/$each_disNums);
$this->subPage_link=$subPage_link;
$this->show_SubPages($subPage_type);
//echo $this->pageNums."--".$this->sub_pages;
}
/*
__destructÎö¹¹º¯Êý£¬µ±À಻ÔÚʹÓõÄʱºòµ÷Ó㬸ú¯ÊýÓÃÀ´ÊÍ·Å×ÊÔ´¡£
*/
function __destruct(){
unset($each_disNums);
unset($nums);
unset($current_page);
unset($sub_pages);
unset($pageNums);
unset($page_array);
unset($subPage_link);
unset($subPage_type);
}
/*
show_SubPagesº¯ÊýÓÃÔÚ¹¹Ô캯ÊýÀïÃæ¡£¶øÇÒÓÃÀ´ÅжÏÏ
Ïà¹ØÎĵµ£º
Ò»¡¢ ¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ã濪·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a) ·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii. Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server 2000 ......
Community-IDÊÇÒ»¸öʵÏÖÁË OpenID 2.0 ÐÒéµÄ PHP ¿â¡£
а汾ÔÚÓû§¹ÜÀí½çÃæÔö¼ÓÁËÒ»¸öÇå³ý°´Å¥£¬ÓÃÀ´Çå³ýËÑË÷ÊäÈë¿òµÄÄÚÈݺʹ洢ÔÚµ±Ç°¹ýÂËÆ÷ÁбíµÄÌõ¼þÐÅÏ¢£»¸üÐÂÁËÌáÐÑÓʼþÄ£°åµÄ·ÒëÎı¾£»ä¯ÀÀÓû§ÁбíµÄʱºò½«ÔÚ״̬ÁÐÖÐÏÔʾÉÐδ¼¤»îµÄÓû§Êý£»Zend¿ò¼ÜÉý¼¶µ½ 1.9.2 °æ±¾£»ÐÞÕýÁËһЩbug¡£
ÏÂÔØ Community-ID 1.1.0 ......
TIOBEÊÀ½ç±à³ÌÓïÑÔÅÅÐаñÕ¹ÏÖÁ˱à³ÌÓïÑÔµÄÁ÷ÐÐÇ÷ÊÆ¡£Ã¿¸öÔ£¬¶¼ÓÐ×îеÄÊý¾Ý±»¸üС£Õâ·ÝÅÅÐаñµÄÊý¾ÝÈ¡ÑùÀ´Ô´ÓÚ»¥ÁªÍøÉϸ»ÓоÑéµÄ³ÌÐòÔ±¡¢ÉÌ ÒµÓ¦Óá¢ÖøÃûµÄËÑË÷ÒýÇ棨ÖîÈç¹È¸è¡¢ MSN ¡¢ÑÅ»¢£©µÄ¹Ø¼ü×ÖÅÅÃû¡¢ Alexa ÉϵÄÅÅÃûµÈ¡£Çë×¢ÒâÕâ¸öÅÅÐаñÖ»ÊÇ·´Ó³ÁËij¸ö±à³ÌÓïÑÔµÄÈÈÃÅ³Ì¶È , Õâ²¢²»´ú±íËüÊÇÒ»¸ö×îºÃµÄ±à³ÌÓïÑÔ» ......
YiiÊÇÒ»¸ö¸ßÐÔÄܵÄPHP5µÄwebÓ¦ÓóÌÐò¿ª·¢¿ò¼Ü¡£Í¨¹ýÒ»¸ö¼òµ¥µÄÃüÁîÐй¤¾ß yiic ¿ÉÒÔ¿ìËÙ´´½¨Ò»¸öwebÓ¦ÓóÌÐòµÄ´úÂë¿ò¼Ü£¬¿ª·¢Õß¿ÉÒÔÔÚÉú³ÉµÄ´úÂë¿ò¼Ü»ù´¡ÉÏÌí¼ÓÒµÎñÂß¼£¬ÒÔ¿ìËÙÍê³ÉÓ¦ÓóÌÐòµÄ¿ª·¢¡£
а汾ÐÞÕýÁË´óÁ¿µÄbug£¬¶Ô³¬¹ý20ÏîµÄ¹¦ÄܽøÐÐÁ˸Ľø£»Í¨¹ýɾ³ýÎÞÓÃµÄ SQL JOIN À´ÌáÉýÁËÀÁģʽϹØϵ AR ²éѯµÄÐÔÄÜ¡£
......
test.php -------------------------------------------------------------------------------------
echo $_SERVER['DOCUMENT_ROOT'].""; //»ñµÃ·þÎñÆ÷Îĵµ¸ù
echo $_SERVER['PHP_SELF'].""; //»ñµÃÖ´ÐиôúÂëµÄÎļþ·þÎñÆ÷¾ø¶Ô·¾¶
/*
phpÊÖ²áÉϵĽâÊÍ£º “PHP_SELF” µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë docum ......