|
Posted by a on 02/18/06 02:00
Hi everybody,
My config: Win XP (or 2003), Apache 2.0.54, PHP 5.1.2.
I have been trying to handle the case of a lenghty opearation on the server
while providing the user with feedback and ability to cancel, and nothing
seems to work so far.
The following code is one attempt to address this, and it is called as
result of a POST:
//*************start code***************
session_start;
// prepare exec
// flush session data
session_write_close;
// trying to display a "Please wait..." message:
header( "Location: please_wait.php" );
// long exec
exec( ... );
// finally show the result of the exec
header( "Location: exec_result.php" );
//************end code*******************
What happens is that only the last header statement has a visual effect, the
first one doesn't do anything, so the user is not presented with the "Please
wait message".
I would appreciate any ideas or code examples on this or the issue of
handling this sort of lengthy operations in general.
Thanks,
A
Navigation:
[Reply to this message]
|