Results 1 to 4 of 4

Thread: php execution

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Location
    Osaka
    Posts
    200

    php execution

    If visitor clicks stop button of browser then php script at server stop executing or it will execute till completion ?

  2. #2
    Addicted Member
    Join Date
    Jan 2006
    Posts
    247

    Re: php execution

    I suppose it depends, PHP is a powerful language for web development, I have been developing with it for over 1.5 years and pretty much have everything memorized, but I have not seen a script that cannot be stopped by the stop button.

    However, you can output a value if the script is stopped, if that helps at all:

    http://us2.php.net/manual/en/function.exit.php



  3. #3
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: php execution

    If the Stop button is pressed then yes, it will stop at whatever point it was executing at. For example, if you have a script which has a for() loop printing out 20,000 numbers, and a user presses Stop when it's at 10,000, the browser will stop asking for the script from the server and so the server will stop executing/sending it to the client. The numbers displayed will therefore be 1 through 10,000.
    Like Archer? Check out some Sterling Archer quotes.

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: php execution

    Actually, there is a function that you can call that prevents PHP from cancelling your script even if the user presses the stop button. But I forgot its name.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width