Re: [SMARTY] fetch() not working in shutdown function

From: Date: Sat, 26 Feb 2005 23:20:52 +0000
Subject: Re: [SMARTY] fetch() not working in shutdown function
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12270@lists.php.net to get a copy of this message
The other things in my shutdown function all get executed fine so I guess the fetch() is just a no go....due to the output buffering. Oh well, I can easily work around it. Thanks for the info. Abdul-Wahid On Sat, 26 Feb 2005 18:55:04 +0100, David Zülke <dz@bitxtender.com> wrote: > 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 shu 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 > > > >

« previous php.smarty.general (#12270) next »