I have the folloing code:
<?php
require_once('db.inc.php');
print "Complete:";
Main::getTable(nu开发者_如何学Cll,null);
sleep(3);
print "<br>Model:";
Main::getTable('model','A2');
?>
The functions work correctly, getTable returns a echo with a HTML strings that generate a table with information, the problem is that Complete appears before the table (OK), then the first table(OK), then it sleeps for 3secs (OK), but then something strange happens, the echo "Model:" appears between "Complete" and the first table, and the second one appears below the first something like:
Complete:
||||||||||| TABLE 1 |||||||||||3 seconds...
Complete:
Model: ||||||||||| TABLE 1 ||||||||||| ||||||||||| TABLE 2 |||||||||||Sounds like your table markup is incomplete or contains errors.
Different browsers handle this in different ways but you'll almost always get something appearing where you don't expect.
Must be an HTML/rendering problem. It's impossible for output to be printed inside already printed output. Check the raw HTML response that is returned, the text is most likely in the correct order there. Fix your HTML structure to make it render correctly in the browser.
The effect of missing </table>
but it might also cause by other things.
http://jsfiddle.net/phelios/BF2Bu/
精彩评论