RE: How to load another php page?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx]
Sent: 02 October 2004 21:07
To: Arnold
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux