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

ʹPHP¼´Ê±Êä³ö½á¹ûµ½ä¯ÀÀÆ÷

PHP:
<?php
for
(
$i
=
0
;
$i
<
10
;
$i
++
)
{
    echo
$i
;
    sleep
(
1
)
;
}
?>
ÀàËÆÉÏÃæµÄ³ÌÐòÈç¹ûÔÚPHP½âÊÍÆ÷ÖÐÖ´ÐУ¬Ã¿Ãë»áÊä³öÒ»¸öÊý£¬ºÍÏëÏóÖÐÒ»Ñù¡£µ«ÊÇÈç¹ûʹÓÃä¯ÀÀÆ÷À´·ÃÎÊ£¬Çé¿ö¾ÍÓÐËù²»Í¬¡£ÔÚä¯ÀÀÆ÷ÖзÃÎÊʱ£¬Ö»ÓÐÔÚÊ®ÃëÖ®ºó²Å»áÒ»´ÎÐÔµØÏÔʾËùÓнá¹û¡£
¿ÉÒÔʹÓÃob_flush()
ºÍflush()
À´Ç¿ÖÆä¯ÀÀÆ÷ˢлº´æ£¬³ÌÐò¸ÄΪ£º
PHP:
<?php
for
(
$i
=
0
;
$i
<
10
;
$i
++
)
{
    echo
$i
;
    ob_flush
(
)
;
    flush
(
)
;
    sleep
(
1
)
;
}
?>
ÔÙʹÓÃä¯ÀÀÆ÷·ÃÎÊ£¬Ëĸöä¯ÀÀÆ÷ÖÐÖ»ÓÐFirefox
¼´Ê±Êä³öÁ˽á¹û¡£ÕâÊÇÒòΪ²»Í¬µÄä¯ÀÀÆ÷¶Ô»º³åµÄ´¦Àí·½Ê½²»Í¬£¬FirefoxÔÚ±»ÒªÇóÇ¿ÖÆˢлº´æʱºÜÌý»°£¬¶øIEÐèÒªÔÚ½ÓÊÕµ½256¸ö×Ö½Úºó²Å»á½«ÄÚÈݼ´Ê±Õ¹ÏÖÔÚ½çÃæÉÏ£¬Safari
ÐèÒª1024¸ö×Ö½Ú£¬Opera
¸üÓиöÐÔ£¬Ö»ÓÐÔÚÓöµ½HTML±êÇ©µÄʱºò²Å»á¼´Ê±Êä³ö£¨SafariÒ²ÊÇÈç´Ë£©¡£
¶ÔÓÚIEºÍSafari£¬¿ÉÒÔÔÚÊä³ö½á¹û֮ǰÏÈÊä³ö´óÓÚÏÞ¶¨ÊýÄ¿µÄ¿Õ°××Ö·û£º
PHP:
<?php
echo
str_repeat
(
" "
,
1024
)
;
for
(
$i
=
0
;
$i
<
10
;
$i
++
)
{
    echo
$i
;
    ob_flush
(
)
;
    flush
(
)
;
    sleep
(
1
)
;
}
?>
¶ø¶ÔÓÚOpera¡¢SafariÓöµ½HTML±êÇ©ºó²Å»á¼´Ê±Êä³öµÄÎÊÌ⣬ÓÉÓÚÒ»°ãÎÒÃDz»»áÖ»Íùä¯ÀÀÆ÷ÖÐÊä³ö´¿Îı¾ÄÚÈÝ£¬¹Ê¿ÉÒÔ²»×÷¿¼ÂÇ¡£¶ÔÓÚÉÏÃæµÄ³ÌÐò£¬¿ÉÒÔÔÚÊä³ö½á¹ûÖмÓÈëHTML±êÇ©À´´ïµ½Ä¿µÄ£º
PHP:
<?php
echo
str_repeat
(
" "
,
1024
)
;
for
(
$i
=
0
;
$i
<
10
;
$i
++
)
{
    echo
$i
.
"<br>"
;
    ob_flush
(
)
;
    flush
(
)
;
    sleep
(
1
)
;
}
?>


Ïà¹ØÎĵµ£º

Yii PHP FrameworkʵÓÃÈëÃŽ̳Ì(ת)

 ×÷Õߣºhttp://blog.csdn.net/zhoufoxcn/archive/2009/11/05/4769858.aspx
˵Ã÷£ºÒòΪ×î½ü¹¤×÷¹¤×÷¹Øϵ£¬ÐèÒª¿ª·¢Ò»¸öÔÚLinuxÏÂÔËÐеÄWeb
Application£¬ÐèÒª¶ÔÏÖÔڱȽÏÁ÷ÐеÄһЩPHP¿ò¼Ü×öÒ»¸öÁ˽âºÍÆÀ¹À£¬ÏÂÃæµÄÕâƪÎÄÕÂÊDZÊÕß×î½üѧϰһ¸ö±È½ÏеÄPHP
FrameworkµÄÒ»µã¾­ÀúºÍ²Ù×÷²½Ö裬ÒòΪ¹Ù·½µÄÊÖ²áдµÃ±È½Ï»Þ ......

PHP¿ò¼ÜCodeIgniterµÄÊý¾Ý¿â²Ù×÷ÕûÀí


1.
$query = $this->db->query('SELECT name, title, email from my_table');
foreach ($query->result() as $row)
{
    echo $row->title;
    echo $row->name;
    echo $row->email;
}
2.
foreach ($query->result_array() as $row)
{ ......

WindowsÏ°²×°×îеÄApache+PHP+MySQLÖ¸ÄÏ

 ×¢Ò⣺֮ǰÎÒÔÚÍøÉÏÕÒÁ˺öàµÄ×ÊÁÏ NND¶¼²»ÄÜÕý³£ÅäÖóɹ¦ ¸ãµÃÎÒÊǷdz£µØÓôÃÆ£¡
ÕÒµ½ÕâƪÎÄÕÂÖ®ºóÎÒÖÕÓÚÅäÖóɹ¦ÁË£¡ÍÛºÃˬѽ£¡Ö»Òª°´ÕÕ ÉÏÃæµÄ²½Öè¾ÍÒ»¶¨Äܹ»³É¹¦µÄ£¡
´ËÎÄյݲװ·½·¨ÊÊÓÃÓÚWindows XPϵÄApache+PHP+MySQL°²×°£¬Í¬Ê±Ò²ÊÊÓÃÓÚWindows 2003ϵͳϵݲװºÍÅäÖá£
1. °²×°»·¾³
²Ù×÷ϵͳÊÇ Window ......

phpÉèÖÃsessionµÄÉú´æÖÜÆÚ

sessionÎļþ±£´æÔÚ·þÎñÆ÷£¬¶Ôÿ¸ösession¶¼»áËæ»úÉú³ÉÒ»¸öΨһµÄsessionIdÀ´½øÐбêʶ£¬Ò»°ãÈç¹ûûÓÐÉèÖÃsessionµÄÉú´æÖÜÆÚ£¬Ôòsession»á±£´æÔÚÄÚ´æÖУ¬¹Ø±Õä¯ÀÀÆ÷£¬¸Ãsessionid»á×Ô¶¯×¢Ïú£¬ÖØÐÂÇëÇóʱÔò×Ô¶¯ÖØзÖÅä¡£
Èç¹û¿Í»§¶ËûÓнûÓÃcookie£¬ÔòÔÚʹÓÃsessionʱ£¬cookie»á°èÑÝ´æ´¢sessionIdºÍsessionÉú´æÖÜÆڵĽÇÉ«¡£¡ ......

phpÈ¡ÉÏÒ»¸öÒ³ÃæÖÐcheckboxÑ¡ÖеÄÖµ

 <?
$music = $_POST['music'];
//È¡µÃËùÑ¡ÖеÄcheckboxµÄ¸öÊý
$coun=count($music);
if ( is_array( $music ) ) {
    echo 'ÄúÑ¡ÔñµÄÊÇ&nbsp;:&nbsp;';
    foreach ( $music as $key => $var )
      echo '&nbsp;&nbsp;['.$var.']';
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ