PHP loop progress display and "false"

Source: Internet
Author: User
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 management


Product Information Management Items)
$ Val) {echo' '; $ Ii ++; // if ($ ii> 2) break ;}?>
ID Product Name Item Price Status Time added Update Time Operation
'. $ 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
Related Article

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.