Results 1 to 4 of 4

Thread: PHP got amnesia?

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    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>";
    
    ?>
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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...';
    ?>

  3. #3

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: PHP got amnesia?

    naah, that does not seems to have any affect.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  4. #4

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: PHP got amnesia?

    for what it help, here's what i am trying to do: http://www.vbforums.com/showthread.php?t=538569
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width