Re: template logic problem
| From: | Miguel Cruz | Date: | Tue, 14 May 2002 08:12:36 +0000 |
| Subject: | Re: template logic problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-97507@lists.php.net to get a copy of this message | ||
By default, PHP can start sending output before it's all been generated.
This results in faster results for web site visitors. On the other hand,
it's not compatible with deciding late in the game that you want a few
extra headers.
If you want to do this sort of thing, read about output buffering in the
manual; it's pretty straightforward.
miguel
On Tue, 14 May 2002, list peters wrote:
> I was hoping i could do something like you suggested. Cold Fusion has a tag
> called <cfhtmlhead> that will include anything within the <head> tags. You
> can call this function even on the last line of your php template. I used
> this a lot.
>
> Has anyone written a function like this? I tried searching but couldnt find
> anything.
>
> thanks
> chad
>
>
> > What I'd do is change your include()d template to wrap a function around
> > the <HTML><BODY> stuff. Then you can call it once you have enough
> > information available, and pass in any variable elements like the name of
> > that rotating image. This will make your templating a whole lot more
> > flexible (you can now specify the <TITLE> on each page, for instance).
> >
> > miguel
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>