|
-
Sep 27th, 2006, 08:29 PM
#1
Thread Starter
Addicted Member
php execution
If visitor clicks stop button of browser then php script at server stop executing or it will execute till completion ?
-
Sep 27th, 2006, 09:58 PM
#2
Addicted Member
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
-
Sep 27th, 2006, 11:15 PM
#3
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.
-
Sep 28th, 2006, 05:01 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|