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º¯ÊýÓÃÔÚ¹¹Ô캯ÊýÀïÃæ¡£¶øÇÒÓÃÀ´ÅжÏÏ
Ïà¹ØÎĵµ£º
PHPÄ£ÄâSMTP·¢ËÍÓʼþµÄÀà
<?php
/*********************************************************
filename£ºmail.class.php
describe£ºÓÊÏäµÄÅäÖ㬾²âÊÔ¿ÉÒÔÊÊÓÃÓÚLinuxºÍwindows
function£º¼ì²éÓÊÏäµÄºÏ·¨ÐÔ£¬·¢ËÍ»ù±¾µÄÓÊÏäÑéÖ¤ÐÅÏ¢
author£º etongchina@gmail. ......
ÎÄÕÂÔÏÈ·¢±íÔÚCSDNÂÛ̳ÉÏÃ棬µ«ÊǺóÀ´¾õµÃ²»Ì«Íס£ËùÒÔûÓÐÔÚCSDNÖмÌÐøдÏÂÈ¥£¬×ª·¢µ½ÕâÀïÁË¡£
ÔÌûhttp://topic.csdn.net/u/20090910/13/fc1e87d1-79b8-488b-b94a-403a0147bca8.html?80258
-------------------------------------------------------------
°¦~
ѧPHPÒ²²»ÖªµÀÓж೤ʱ¼äÁË¡£
·´Õý´Ó´óÒ»µÄʱºò¿ª ......
×î½üÔÚ×öÒ»¸öÏîÄ¿£¬Óöµ½AJAXÖÐÎÄÂÒÂëÎÊÌ⣬¾¹ýÒ»¸öÏÂÎçµÄŬÁ¦ÖÕÓÚÍêÃÀ½â¾ö£¬ÏÖ½«ÐĵÃдÏÂÀ´£¬Ï£Íû¶ÔÄÇЩ»¹À§ÈÆÔÚÕâ¸öÎÊÌâ¶øÍ·Í´²»ÒѵÄÈËÃÇÓÐËù°ïÖú¡£
ÖÚËùÖÜÖª£¬Ê¹ÓÃAJAX´«ËͺͽÓÊÕÖÐÎIJÎÊýʱ£¬Èç¹û²»ÔÚ¿Í»§¶ËºÍ·þÎñÆ÷×öÏàÓ¦µÄ´¦Àí¾Í»á³öÏÖÂÒÂëÎÊÌ⣬ÔÚÍøÉÏÏàÓ¦µÄÎÄÕÂÒ²²»ÉÙ£¬µ«ÊÇÓеÄÇé¿öϺÜÄÑ´ÓÖÐÕÒµ½·ûºÏ×Ô¼ºÀíÏëµÄ´ð ......
test.php -------------------------------------------------------------------------------------
echo $_SERVER['DOCUMENT_ROOT'].""; //»ñµÃ·þÎñÆ÷Îĵµ¸ù
echo $_SERVER['PHP_SELF'].""; //»ñµÃÖ´ÐиôúÂëµÄÎļþ·þÎñÆ÷¾ø¶Ô·¾¶
/*
phpÊÖ²áÉϵĽâÊÍ£º “PHP_SELF” µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë docum ......
1¡¢Ê¹Óþø¶Ô·¾¶°üº¬Îļþ
ÔÚÿ´Î¶ÔÎļþµÄ°üº¬ÖУ¬¶¼Ê¹ÓÃϵͳ¾ø¶Ô·¾¶½øÐаüº¬£¬±ÈÈç require('/var/www/html/inc/test.inc')£»µÄ·½Ê½£¬ÔÚËùÓÐÎļþÖж¼ÕâÑù°üº¬¾Í¿ÉÒÔ±ÜÃâ¶à¼¶°üº¬³öÏÖµÄÎÊÌ⣬µ«ÊÇÕâÖз½Ê½²»Áé»î£¬ÏµÍ³¿ÉÒÆÖ²ÐÔ¼«²î£¬½¨Òé²»²ÉÓá£
2¡¢ÔÚÒ»¸ö¹«ÓÃÎļþÖж¨Ò幫ÓÃÎļþµÄÁÐ±í£¬½«¸÷¸ö¹«ÓÃÎļþµÄ ......