PHP loop progress display and false dead theoretically the program should run 500 times before the display is successful, however, the page can only be run for more than ten times and the page starts to be completely white (and the Mark loaded on the page disappears), so the program will not be executed any more.
How can I solve this problem? thank you.
In addition, I do not know how to handle the progress. Thanks again
";}} Echo" OK ";?>
Reply to discussion (solution)
3 seconds × 500 = how long?
Not Dead
3 seconds × 500 = how long?
Run time is not set.
Nnd and csdn gave me 500 more requests ......
It has a long relationship with running time. you have rested for 3 seconds for the first time.
It was originally a program for collecting data and writing data into the database. here I just want to express the meaning of the code that is less easy to read.
Set_time_limit
The main content of my original program is as follows:
$ _ POST ["appOAuthkey"], "user" = >$ _ POST ["user"], "pw" = >$ _ POST ["pw"], "appOAuthID" = >$ _ POST ["appOAuthID"], "accessToken" = >$ _ POST ["accessToken"], "appOAuthkey" = >$ _ POST ["appOAuthkey"], "lirun" = >$ _ POST ["lirun"], "uin" = >$ _ POST ["uin"]); $ db-> row_update ("config", $ data, "id = 1 "); if ($ db-> get_errno () {alert_back ("setting failed! ");} Else {alert_back (" set successfully! ") ;}}$ 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']; // item status $ PageSize = GetPageSize ($ itemState); // number of item pages for ($ I = 1; $ I <= $ PageSize; $ I ++) {$ htm = GetItemList ($ itemState, $ I); $ xml = simplexml_load_string ($ htm ); $ item = $ xml-> itemList-> item; $ itemName = $ item-> itemName; $ ite MName = 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" => $ time); // progress information PageSize} alert_back ("scan ends, total Information count: {$ PageSize }! ") ;}?>Price and inventory management system
Log out
Pat platform-Price and inventory management system
Product Information Management Items) |
ID |
Product Name |
Item |
Price |
Status |
Time added |
Update Time |
Operation |
$ Val) {echo'
'. $ Val ['id'].' |
'. $ Val ['proname']." |
Http://auction1.paipai.com/". $ val ['item']." target = _ blank> ". $ 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 ;}?>
|