RE: [SMARTY] fetch() not working in shutdown function
| From: | David Zülke | Date: | Sat, 26 Feb 2005 17:55:04 +0000 |
| Subject: | RE: [SMARTY] fetch() not working in shutdown function | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12269@lists.php.net to get a copy of this message | ||
fetch() uses output buffering to catch the output and store it in a variable
it returns. Maybe PHP doesn't execute any output operations when shutting
down. You may want to try some other operation (like saving a row to a
database) to ensure your shutdown stuff gets executed. If that's the case,
there's not much you can do to make fetch() work, I guess.
Regards,
David
> -----Original Message-----
> From: Abdul-Wahid Paterson [mailto:abdulwahid@gmail.com]
> Sent: Saturday, February 26, 2005 6:44 PM
> To: Mark Rogers
> Cc: Smarty general
> Subject: Re: [SMARTY] fetch() not working in shutdown function
>
> Sure, but with the fetch() I am not sending out any output to the
> browser. I have already done that with my display(). In this case, I
> am doing something else with the data returned from the fetch() and
> not displaying it in the browser.
>
> Abdul-Wahid
>
>
>
>
> On Fri, 25 Feb 2005 18:04:42 -0000, Mark Rogers <mark@quarella.co.uk>
> wrote:
> > Abdul-Wahid Paterson writes:
> > > Does anyone know of any reason the fetch wouldn't work in this
> situation?
> >
> > The shutdown functions cant send any output, as the request has been
> > completed by this point. From the PHP help:
> >
> > The registered shutdown functions are called after
> > the request has been completed (including sending
> > any output buffers), so it is not possible to send
> > output to the browser using echo() or print(), or
> > retrieve the contents of any output buffers using
> > ob_get_contents().
> >
> > This is a PHP limitation (well, not a limitation, since it does what it
> is
> > designed to do).
> >
> > --
> > Mark Rogers,
> > More Solutions Ltd
> >
> >
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>