-
PHP got amnesia?
first off, sorry cross-posting between here and javascript section
The following code run fine, but it does not sleep 10 seconds. Just run the first and third lines immediately.
Code:
<?php
echo "<script>var newWindow=window.open('testpage1.html', 'TestWindow 1', 'width=200,height=200');</script>";
sleep(10);
echo "<script>newWindow.close();</script>";
?>
-
Re: PHP got amnesia?
How are you testing it? It may be that you have implicit output buffering enabled. If that is the case, execution will halt for ten seconds between writing the two lines to the buffer, but the buffer will be flushed all at once when the script ends.
You could try this:
PHP Code:
<?php
header('Content-type: text/plain');
echo "Hello!\n";
ob_flush();
sleep(20);
echo 'A short time later...';
?>
-
Re: PHP got amnesia?
naah, that does not seems to have any affect.
-
Re: PHP got amnesia?
for what it help, here's what i am trying to do: http://www.vbforums.com/showthread.php?t=538569