Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÓʼþµÄÊÕ

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

PHP 5.3.0 Á¬½Ómysqli³ö´íµÄ½â¾ö

½üÈÕÒò¹«Ë¾¿ª·¢ÐèÒª,ÔÚ±¾»úWin7ϼÜÉèÁËApache+MySql+PHP
ËùʹÓÃPHP°æ±¾:PHP5.3.0, Ö®ºó·¢ÏÖÎÞ·¨Á¬½ÓmysqlÊý¾Ý¿â,¾ù±¨³¬Ê±´íÎó:
PHP Warning: mysqli::mysqli(): [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in xxx.php on line x
PHP Warni ......

PHP»º³å¼¼Êõ


Ò»¡¢»º´æ¼¼Êõ:   
ÓÐЩÐÅÏ¢±È·½¾­³£²»±äµÄ,µ«ÊÇ»¹ÊÇÄܱäµÄÐÅÏ¢·ÅÔÚ»º´æÖÐÒÔ¼Ó¿ìÏÔʾËÙ¶È,ÕâÊǺÜÓмÛÖµµÄ,ËùνµÄ»º´æ,ͨË×µÄÀí½â¾ÍÊÇһЩ±£´æÔÚ·þÎñÆ÷¶ËµÄ¹²ÓÃÐÅÏ¢.ËüÊÇÓÚ·þÎñÆ÷ͬÉúËÀµÄ,ÎÒÃÇÔÚ±£´æ»º´æµÄʱºò¿ÉÒÔÖ¸¶¨Ï´θüеÄʱ¼äµÄÅжÏ,±È·½ÒªÔÚ5·ÖÖÓ¸üÐÂÒ»´Î,¿ÉÒԼǼÉϴθüеÄʱ¼ä,ºÍµ±Ç°Ê±¼ä±È½Ï, ......

phpºóÍËÒ»Ò³±íµ¥ÄÚÈݵı£´æ


php±íµ¥ÔÚÌá½»Ö®ºóÔÙºóÍË,±íµ¥µÄÄÚÈÝĬÈÏÊDZ»Çå¿ÕµÄ(ʹÓÃsession_startµÄʱºò),
½â¾ö·½·¨ÊÇÔÚsession_start()Ö®ºó,×Ö·ûÊä³ö֮ǰдÉÏ
header(“Cache-control: private”);  
 
ÍøÒ³µÄ»º´æÊÇÓÉHTTPÏûϢͷÖеēCache-control”À´¿ØÖƵģ¬³£¼ûµÄÈ¡ÖµÓÐprivate¡¢no- cache¡¢max-age¡ ......

9.3 ͨ¹ýPHP²Ù×÷AccessÊý¾Ý¿â

9.3  ͨ¹ýPHP²Ù×÷AccessÊý¾Ý¿â
9.3.1  Á¬½ÓAccessÊý¾Ý¿â
ÔÚPHPÖÐÁ¬½ÓAccessÓÐÈçÏÂ3ÖÖ·½Ê½¡£
£¨1£©´´½¨ÏµÍ³Êý¾ÝÔ´£¬ÓÃPHPÌṩµÄODBCº¯Êý
¼´¿É¡£
£¨2£©Í¬Ñù¿ÉÒÔʹÓÃPHPµÄODBCº¯Êý£¬µ«²»´´½¨
Êý¾ÝÔ´¡£¿ª·ÅÊý¾Ý¿âÁ¬½Ó£¨Open DateBase
Conection£¬ODBC£©ÊÇWindows Open
Server£¨¿ª·Å·þÎñ£©API£¨WOSA£©²úÆ·Ö®Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ