Implement echo and execute and output-php Tutorial

Source: Internet
Author: User
Implement echo to execute and output $ result = mysql_query ("SELECT * FROM 'A '");

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;
}



The rented Alibaba server can implement the first select output and then execute the second select. after the server is upgraded, all select statements are executed for unified query, which is a bit suspended, how can I implement the original side execution side output? I am using PHP5.2. Is there a problem with the version?


Reply to discussion (solution)

Is this forum no longer popular?

Maybe it's your previous configuration problem!
The general configuration is to wait until the entire page is run and then output. the unexecuted output is saved in the buffer.
If you want to see the output before execution, you can retrieve the content in the buffer.
Ob_flush; flush ();

Ob_flush (); flush ();

There is a roundabout way to write a file 1 2 3 4 5 and then the front-end AJAX requests to read the file's real-time output status.

At least the code you post won't have the effect you described (it won't happen in any situation unless you conceal something)

Forced server buffer (ob_flush and flush) is only valid for some servers and is related to browsers.

? ? Outbound ??? You can.
Ob_flush ();
Flush ();
? Exam: http://blog.csdn.net/fdipzone/article/details/10367837

Execute the program several seconds, and then buffer the output, so that you can set a higher timeout value for your server.

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.