Re: How to load another php page?
| From: | Arnold | Date: | Sat, 02 Oct 2004 19:53:51 +0000 |
| Subject: | Re: How to load another php page? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198507@lists.php.net to get a copy of this message | ||
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".
"Marek Kilimajer" <lists@kilimajer.net> wrote in message
news:415F01F3.1080806@kilimajer.net...
> Arnold wrote:
> > This (header() function) works only if this is the first output sent to
> > browser so later in the script this doesnt work anymore, i've tried
that.
> > After that you get error messages like: "Warning: Cannot modify header
> > information - headers already sent by (output started at
> > D:\Inetpub\wwwroot\xxxxxxx.php:5) in D:\Inetpub\wwwroot\xxxxxx.php on
line
> > 31"
> > So what i want is to go to another php file everywhere in the php script
> > with something like: if(thisistrue) { load yyyyy.php; exit; }
> >
>
> Once again, why cannot you use inlude()?
>
> If include() does not work for you, you have to rethink the logic of
> your script.