PHP Progress Bar without flush()?

Discussion in 'PHP' started by batman4444, Jan 9, 2009.

  1. #1
    I have a server side script that takes a long time to execute and would like to create a progress bar so the user knows that the process has not hung.

    I am aware that using flush() or ob_flush() you would be able to easily accomplish this, however, I have spent 3 nights now trying to get flush() to work on my web server and for the life of my I just cant get it to flush to the browser correctly (or at all).

    So my question is, does anybody know of another way to create a progress bar for a time intensive php script? Thanks
     
    batman4444, Jan 9, 2009 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Sounds like you need it to occur for the entire script:

    ob_implicit_flush(true);
    PHP:
    At top of document.
     
    Danltn, Jan 10, 2009 IP