Implement echo to perform edge output

Source: Internet
Author: User
$result = mysql_query ("select * from ' AA '");

while ($row = Mysql_fetch_array ($result))
{
$DJ = $row ["DJ"];
Echo $DJ;
}


$result = mysql_query ("select * from ' BB '");

while ($row = Mysql_fetch_array ($result))
{
$DJ = $row ["DJ"];
Echo $DJ;
}



Leased Ali server, the original can achieve the first select output and then execute the second select, after upgrading the server, now is all select to execute the unified query, so feel a bit of suspended animation state, how to achieve the original side execution side output Ah, I'm using PHP5.2. Is there a problem with the version?


Reply to discussion (solution)

Is there no popularity in this forum now?

Maybe it's your previous configuration problem!
The general configuration is to wait for the page to finish running and then output, not finished output, saved in the buffer.
If you want to wait until you're done, you'll see the output can take out the contents of the buffer first.
Ob_flush;flush ();

Ob_flush (); flush ();

There is a roundabout way to write a file 1 2 3 4 5 Then the front-end Ajax goes to request to read the file in real-time output state.

At least the code you put out will not have the effect you describe (in any event, unless you hide something)

Force-Eject server-side buffering (Ob_flush, flush) is only valid for some servers and is browser-related

The??? of the system. We can.
Ob_flush ();
Flush ();
? Test: http://blog.csdn.net/fdipzone/article/details/10367837

Execute the program in a few seconds and then buffer the output, setting your server to a higher time-out

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.