|
-
Sep 6th, 2008, 03:13 AM
#1
Thread Starter
Frenzied Member
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>";
?>
-
Sep 6th, 2008, 05:10 AM
#2
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...'; ?>
-
Sep 7th, 2008, 09:02 AM
#3
Thread Starter
Frenzied Member
Re: PHP got amnesia?
naah, that does not seems to have any affect.
-
Sep 7th, 2008, 09:08 AM
#4
Thread Starter
Frenzied Member
Re: PHP got amnesia?
for what it help, here's what i am trying to do: http://www.vbforums.com/showthread.php?t=538569
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
|