ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

5-5-1 ±j¨î¿é¥X»P²M°£½w½Ä°Ï¸ê®Æ

5-5-1 ±j¨î¿é¥X»P²M°£½w½Ä°Ï¸ê®Æ

5-5-1   ±j¨î¿é¥X»P²M°£½w½Ä°Ï¸ê®Æ
·í§Ú­Ì°õ¦æ¡uob_start();¡v©R¥O±Ô­z«á¡A¤]´N¬O¶}±Ò½w½Ä°Ï«á¡A¨Ã¤£¤@©w­nµ¥¨ì¾ã¥÷PHPºô­¶³£¸ÑĶ§¹²¦«á¤~¯à¶}©l¿é¥X¸ê®Æ¡A¦bPHPºô­¶¸ÑĶªº¹Lµ{¤¤¡A§Ú­Ì¥i¥H§Q¥Îflush()¨ç¼Æ±j¨î±N¦s©ñ©ó½w½Ä°Ïªº¸ê®Æ¥ß§Y¿é¥X¡A¤]¥i¥H§Q¥Îob_end_flush()¨ç¼Æ±N¦s©ñ©ó½w½Ä°Ïªº¸ê®Æ¿é¥X¨ÃÃö³¬½w½Ä°Ï¡C
ex05_13.php
  1. <? ob_start();?>
  2. <html><body>
  3. <?
  4. echo "¸ê®Æ²Ä¤@¦¸¦s¤J½w½Ä°Ï";
  5. ob_end_flush();

  6. ob_start();
  7. echo "¸ê®Æ²Ä¤G¦¸¦s¤J½w½Ä°Ï";
  8. ob_end_clean();
  9. ?>
  10. </body>
  11. </html>
½Æ»s¥N½X
¥H¤W¨Ò¨Ó»¡¡A¿é¥Xªº¸ê®Æ±N¥u¦³³Q±j¨î¿é¥Xªº¡u<html>¡B<body>¡v»P¡u¸ê®Æ²Ä¤@¦¸¦s¤J½w½Ä°Ï¡v¡AÁÙ¦³¾ã¥÷PHPºô­¶³£¸ÑĶ§¹²¦¤~¶}©l¿é¥Xªº¸ê®Æ¡u</html>¡B</body>¡v¡C

  • ¦b¡u<html>¡B<body>¡v»P¡u¸ê®Æ²Ä¤@¦¸¦s¤J½w½Ä°Ï¡v¦bob_end_flush()©R¥O°õ¦æ«á³Q±j¨î¿é¥X¡A¦Ó½w½Ä°Ï¤]¦P®É³QÃö³¬¤F¡C
  • ·í°õ¦æ¡uecho "¸ê®Æ²Ä¤G¦¸¦s¤J½w½Ä°Ï";¡v©R¥O±Ô­z«á¡A¡y¸ê®Æ²Ä¤G¦¸¦s¤J½w½Ä°Ï¡z³Q¦s©ñ¦Ü½w½Ä°Ï¡C
  • ¡uob_end_clean();¡v©R¥O±Ô­z°õ¦æ«á¡A½w½Ä°Ï¤º®e³Q²M°£¡A¡y¸ê®Æ²Ä¤G¦¸¦s¤J½w½Ä°Ï¡z³Q¤H¶¡»]µo¤£¦s¦b¤F¡I¦Ó½w½Ä°Ï¤]¦A¦¸³QÃö³¬¤F¡C
  • ¡u</html>¡B</body>¡v¨Ã¨S¦³³Q¦s©ñ¦Ü½w½Ä°Ï¡A¦Ó¬O³Qª½±µ¿é¥X¡C
¥H¤W½×ÃÒ¥iÂǥѽd¨Òex05_13.php°õ¦æ«á¡A±qÀ˵øºô­¶­ì©lÀɤ¤Àò±oÃÒ©ú¡A¦p¤U¹Ï¡G

¹Ï5-18  ½d¨Òex05_13.php¡C
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD