Re: Output buffering
| From: | Toby Butzon | Date: | Thu, 21 Dec 2000 10:18:45 +0000 |
| Subject: | Re: Output buffering | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31391@lists.php.net to get a copy of this message | ||
I'm not quite sure what you're saying here, Maxim. I agree with the usage of
include, as that may be helpful... the user gets a message, waits a period
of time, and the second file is included. However, the downside to this is
of course that the message doesn't go away...
But it looks like you were going for a redirect anyway. To simplify what I
mean, the end result would've been:
: <?
: echo 'redirecting you to bar.php';
: sleep(3);
: header("Location bar.php");
: ?>
...which would simply display the echo'd message because headers can't be
sent after content.
So, IMO, you're stuck with a META or JavaScript redirect.
Toby Butzon
[ criticism spurs improvement ]
----- Original Message -----
From: "Maxim Maletsky" <maxim.maletsky@japaninc.net>
To: "'Milan Mlynarcik'" <mmlynarcik@charmed.sk>; "PHP mail list
General"
<php-general@lists.php.net>
Sent: Thursday, December 21, 2000 5:10 AM
Subject: RE: [PHP] Output buffering
: here:
:
: foo.php
: -----------
: <?
: echo 'redirecting you to bar.php';
: sleep(3);
: include('bar.php')
: ?>
:
: bar.php
: -----------
: <?
:
: header("Location bar.php");
:
: ?>
:
: But this is when you're sure that users access bar.php only from foo.php
: Otherwise echo a javascript or meta redirect in foo.php:
: foo.php
: -----------
: <?
: echo '<META HTTP-EQUIV="Refresh" CONTENT="3; URL=/bar.php">';
: echo 'redirecting you to bar.php';
: ?>
:
: Cheers!
: Maxim Maletsky
:
:
: -----Original Message-----
: From: Milan Mlynarcik [mailto:mmlynarcik@charmed.sk]
: Sent: Thursday, December 21, 2000 6:54 PM
: To: PHP mail list General
: Subject: [PHP] Output buffering
:
:
: Can somebody explain how to echo some text than wait for a while and then
: redirect to another location ???
: -------------------------------------------------------------
: Milan Mlynarcik
: Web Programmer
: Charmed Technology Slovakia
: -------------------------------------------------------------
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
: For additional commands, e-mail: php-general-help@lists.php.net
: To contact the list administrators, e-mail: php-list-admin@lists.php.net
:
: