In theory, the program should run 500 times before showing success, but basically only run a 10 cretin page to start all white (while the page loaded in the flag has disappeared), no longer continue to execute the program down
How to solve this problem, thank you
In addition, the progress aspect does not know how to deal with. Thanks again
";}} echo "OK";? >
Reply to discussion (solution)
3 seconds x500= how long?
It's not dead.
3 seconds x500= how long?
No run time set, not dead.
Nnd,csdn give me 500 and let me send one more time ...
It's too long to run, and you're resting for 3 seconds.
Originally is a collection and write the database program, here just want to express approximate meaning code less easy to see
Set_time_limit.
The following are the main contents of my original program
$_post["Appoauthkey"], "user" =>$_post["user", "PW" =>$_post["PW"], "Appoauthid" => ; $_post["Appoauthid"], "Accesstoken" =>$_post["Accesstoken"], "Appoauthkey" =>$_post["Appoauthke Y "]," Lirun "=>$_post[" Lirun "," UIn "=>$_post[" UIn "]); $db->row_update ("config", $data, "id=1"); if ($db->get_errno ()) {Alert_back ("Setup failed!"); }else{Alert_back ("Set success!"); }} $conf = $db->row_query_one ("select * from config where id=1"); $data = $db->row_query ("SELECT * from Data"), if ($act = = "Scan") {//$db->row_delete ("Data", ""); $itemState = $_post[ ' ItemState '];//commodity status $pagesize = GetPageSize ($itemState);//Product page for ($i =1; $i <= $PageSize; $i + +) {$htm = GetItemList ($ ItemState, $i); $xml = simplexml_load_string ($htm); $item = $xml->itemlist->item; $itemName = $item->itemname;$ ItemName = Iconv (' utf-8 ', ' gb2312 ', $itemName); $itemState = $item->itemstate; $itemCode = $item->itemcode; $itemPrice = $item->itemprice; $db->row_insert ("Data", Array ("Proname" =>$ ItemName, "Item" = $itemCode, "price" = $itemPrice, "itemState" + $itemState, "Add_time" and "$time");//Progress Information Pagesize}alert_back ("Scan ended, total number of messages: {$PageSize}!");}? ><title>Price and Inventory management system</title>
Log Off LoginPat platform-Price and Inventory management system
Product information Management (total information) |
Id |
Product Name |
Item |
Price |
State |
Add Time |
Update Time |
Operation |
$val) {echo '
'. $val [' id ']. ' |
'. $val [' Proname ']. " |
". $val [' item ']. ' |
'. $val [' Price ']. ' |
'. $status _str[$val [' itemState ']. ' |
'. Date ("Y-m-d h:i:s", $val [' Add_time ']). ' |
'. Date ("Y-m-d h:i:s", $val [' Up_time ']). ' |
Delete |
'; $ii ++;//if ($ii >2) break;}? >
|
Set_time_limit.
Added this program to run the end smoothly (longer time)
But this progress shows as if it had to run to the end to show it together ...
PHP is one time to calculate the output, even if the same side as the CLI to calculate the side output, but also to constantly brush the screen to achieve the progress bar effect
Progress in the client display, you think PHP will be in the server-side computing--Client display--server-side computing-client display-> Is that so?
If you want to do this, you have to take the loop apart, the client receives the first data, and then Ajax sends a next request to the server, PHP computes the next, sends the result to the client, and the client then Ajax ...