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

PHP ·ÖÒ³¼¼Êõ

1¡¢Ç°ÑÔ
    
·ÖÒ³ÏÔʾÊÇÒ»Öַdz£³£¼ûµÄä¯ÀÀºÍÏÔʾ´óÁ¿Êý¾ÝµÄ·½·¨£¬ÊôÓÚweb±à³ÌÖÐ×î³£´¦ÀíµÄʼþÖ®Ò»¡£¶ÔÓÚweb±à³ÌµÄÀÏÊÖÀ´Ëµ£¬±àдÕâÖÖ´úÂëʵÔÚÊǺͺôÎüÒ»Ñù×Ô
È»£¬µ«ÊǶÔÓÚ³õѧÕßÀ´Ëµ£¬³£³£¶ÔÕâ¸öÎÊÌâÃþ²»×ÅÍ·Ð÷£¬Òò´ËÌصØ׫д´ËÎĶÔÕâ¸öÎÊÌâ½øÐÐÏêϸµÄ½²½â£¬Á¦ÇóÈÿ´ÍêÕâƪÎÄÕµÄÅóÓÑÔÚ¿´ÍêÒÔºó¶ÔÓÚ·ÖÒ³ÏÔʾµÄÔ­Àí
ºÍʵÏÖ·½·¨ÓÐËùÁ˽⡣±¾ÎÄÊʺϳõѧÕßÔĶÁ£¬ËùÓÐʾÀý´úÂë¾ùʹÓÃphp±àд¡£
2¡¢Ô­Àí
    
Ëùν·ÖÒ³ÏÔʾ£¬Ò²¾ÍÊǽ«Êý¾Ý¿âÖеĽá¹û¼¯ÈËΪµÄ·Ö³ÉÒ»¶ÎÒ»¶ÎµÄÀ´ÏÔʾ£¬ÕâÀïÐèÒªÁ½¸ö³õʼµÄ²ÎÊý£º
      
ÿҳ¶àÉÙÌõ¼Ç¼£¨$PageSize£©£¿
       µ±Ç°Êǵڼ¸Ò³£¨$CurrentPageID£©£¿
    
ÏÖÔÚÖ»ÒªÔÙ¸øÎÒÒ»¸ö½á¹û¼¯£¬ÎҾͿÉÒÔÏÔʾij¶ÎÌض¨µÄ½á¹û³öÀ´¡£
    
ÖÁÓÚÆäËûµÄ²ÎÊý£¬±ÈÈ磺ÉÏÒ»Ò³£¨$PreviousPageID£©¡¢ÏÂÒ»Ò³£¨$NextPageID£©¡¢×ÜÒ³Êý£¨$numPages£©µÈµÈ£¬¶¼¿ÉÒÔ¸ù¾ÝÇ°
±ßÕ⼸¸ö¶«Î÷µÃµ½¡£
     ÒÔmysqlÊý¾Ý¿âΪÀý£¬Èç¹ûÒª´Ó±íÄÚ½Øȡij¶ÎÄÚÈÝ£¬sqlÓï¾ä¿ÉÒÔÓãºselect * from table
limit offset, rows¡£¿´¿´ÏÂÃæÒ»×ésqlÓï¾ä£¬³¢ÊÔһϷ¢ÏÖÆäÖеĹæÂÊ¡£
            Ç°10Ìõ¼Ç¼£ºselect *
from table limit   0,10
     µÚ11ÖÁ20Ìõ¼Ç¼£ºselect * from table limit 10,10

     µÚ21ÖÁ30Ìõ¼Ç¼£ºselect * from table limit 20,10
     ……
    
ÕâÒ»×ésqlÓï¾äÆäʵ¾ÍÊǵ±$PageSize=10µÄʱºòÈ¡±íÄÚÿһҳÊý¾ÝµÄsqlÓï¾ä£¬ÎÒÃÇ¿ÉÒÔ×ܽá³öÕâÑùÒ»¸öÄ£°å£º
         
select *
from table limit ($CurrentPageID - 1) * $PageSize, $PageSize
    
ÄÃÕâ¸öÄ£°å´úÈë¶ÔÓ¦µÄÖµºÍÉϱßÄÇÒ»×ésqlÓï¾ä¶ÔÕÕһϿ´¿´ÊDz»ÊÇÄÇô»ØÊ¡£¸ã¶¨ÁË×îÖØÒªµÄÈçºÎ»ñÈ¡Êý¾ÝµÄÎÊÌâÒÔºó£¬Ê£Ïµľͽö½öÊÇ´«µÝ²ÎÊý£¬¹¹ÔìºÏÊʵÄ
sqlÓï¾äÈ»ºóʹÓÃphp´ÓÊý¾Ý¿âÄÚ»ñÈ¡Êý¾Ý²¢ÏÔʾÁË¡£ÒÔÏÂÎÒ½«ÓþßÌå´úÂë¼ÓÒÔ˵Ã÷¡£
3¡¢¼òµ¥´úÂë
    
ÇëÏêϸÔĶÁÒÔÏ´úÂ룬×Ô¼ºµ÷ÊÔÔËÐÐÒ»´Î£¬×îºÃ°ÑËüÐÞ¸


Ïà¹ØÎĵµ£º

php ³ÌÐòÔËÐÐʱ¼ä ¼ÆËã

/**
* »ñµÃµ±Ç°Ê±¼äµÄºÁÃëÊý£¬Óû§¼ì²âÒ³ÃæµÄÖ´ÐÐʱ¼ä
*
* @author cjz
* @date Thu Apr 09 15:05:55 CST 2009
*
* @return float(ºÁÃëÊý)
*/
function myGetMicrotime()
{
list($usec,$sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
  ......

PHPÌáÈ¡8684¹«½»Êý¾Ý

×î½üÒ»ÄêÀ´Ò»Ö±ÔÚʹÓÃfedora£¬·¢ÏÖlinuxÕæÊÇÌ«ÊʺÏÎÒÁË£¬Ï²»¶Ð´³ÌÐò£¬×Ô¼ºÏ¹µ¹ÌÚ£¬°¦windowsÎóÎÒ´óºÃÄ껪……
ÓÃPHPдÁËÒ»¶Î³ÌÐòÓÃÓÚÌáÈ¡ÍøÒ³ÖеÄÊý¾Ý£¬ÏàÐÅËÑË÷ÒýÇæÒ²ÊDz¶àµÄÏë·¨£¬Ö»²»¹ýËûÃÇÊý¾Ý¶à£¬Ëã·¨ºÃЩ£¬ºÇºÇ
[php]
<?php
/*
*´ËÎļþµÄÄ¿±êÊÇ×Ô¶¯ËѼ¯´æ´¢8684ÉϵÄÉîÛÚÊй«½»Êý¾Ý
*
*ÓÉ ......

PHPÉú³ÉÊý¾ÝÁ÷GIFºÍPNG͸Ã÷ͼÐÎ


<?php
header("content-type:image/png");
$img=ImageCreate(100,35);
$bgcolor=ImageColorAllocate($img,0,0,0);
$red=ImageColorAllocate($img,255,0,0);
$bgcolortrans=ImageColorTransparent($img,$bgcolor);
ImageString($img,5,10,10,"PNG PHP",$red);
ImagePng($img);
ImageDestro ......

phpÓʼþµÄÊÕ

phpÓʼþ¶ÁÈ¡£º
³ÌÐò¿ª·¢µÄ˼·£ºmailÎļþ£ºÏÈÁ¬½Óµ½pop3£¬¶ÁÈ¡Óû§µÄÓʼþÁÐ±í£¬ÅжÏÓʼþÊÇ·ñ¶ÁÈ¡¹ý£¬Èç¹ûû¶ÁÈ¡¹ý¾Í°ÑÓʼþ¼Óµ½ÖÐתµÄÊý¾Ý¿âÖС£get_mail£¨£©º¯Êý£¬¶ÁÈ¡Êý¾Ý¿âÖеÄÓʼþÁÐ±í£¬¶ÁÍêºó¶ÔÊý¾Ý¿â½øÐÐÇå³ý¡£ÒÔ±ãÄÜÒ»Ö±¶ÁÈ¡µÄ¶¼ÊÇеÄÓʼþ¡£
´úÂë³ÌÐò£ºmailÎļþ£º
header("content-type:text/html; charset=utf-8 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ