RE: [PHP] How to load another php page?
| From: | Graham Cossey | Date: | Sat, 02 Oct 2004 22:14:48 +0000 |
| Subject: | RE: [PHP] How to load another php page? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198510@lists.php.net to get a copy of this message | ||
For my own clarification, would it not be possible to use output buffering
and then either redirect to another script using header() or output the
buffer contents?
<?php
ob_start();
[php code]
if ($variable = 1)
header("Location: script1.php");
if ($variable = 2)
header("Location: script2.php");
ob_flush();
?>
thanks
Graham
-----Original Message-----
From: Marek Kilimajer [mailto:lists@kilimajer.net]
Sent: 02 October 2004 21:07
To: Arnold
Cc: php-general@lists.php.net
Subject: Re: [PHP] How to load another php page?
Arnold wrote:
> Ok, i can live with it, include works but this doesnt replace the whole
> running script, only the rest of the script (what is still coming), so if
a
> few things have been written in "a.php", when "include('b.php') is
executed,
> this "b.php" does not replace all the (allready written) output of
"a.php".
That's how the life goes. Once you say something, you can't take it
back. So think first, then open your mouth :) (put your logic before the
output).
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php