Re: Return to browser and keep running!
| From: | Manuel V�zquez Acosta | Date: | Wed, 15 Oct 2003 19:12:00 +0000 |
| Subject: | Re: Return to browser and keep running! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166235@lists.php.net to get a copy of this message | ||
"Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message
news:3F8D53E8.70104@webglobe.sk...
> Use register_shutdown_function()
I made this test:
<?php
function shutingdown()
{
$fh = fopen('d:/tmp/test.out', 'w');
if ($fh)
{
for($i=0; $i<10000000; $i++)
fwrite($fh, "$i\n");
fclose($fh);
}
}
register_shutdown_function('shutingdown');
echo "Running...";
flush();
exit();
?>
But the browser gets this:
Running...
Fatal error: Maximum execution time of 30 seconds exceeded in
d:\tests\shutdown.php on line 8
My env is: Windows XP-Pro. WebServer: Apache 1.3.24. PHP 4.3.3 (apache
module)
Thanks and regards,
Manu.