List Info

Thread: echo?




echo?
user name
2007-04-23 08:14:16
Hello everyone,

I've been stuck in a previous projects that use the older
versions, but 
now I'm using 0.9.2 and can't seem to echo from my
controllers::actions().

I tested this theory by using a header location to http://google.com 
instead of an echo 'I come here'; and it worked. Is the ZFW
using some 
kind of output buffer?

It also only seem to have this behavior when I'm using 
:module:controller:action?

Kind regards,
Peter Pistorius



Re: echo?
user name
2007-04-23 06:22:29
-- Peter Pistorius <petergtmt.co.za> wrote
(on Monday, 23 April 2007, 01:14 PM +0000):
> I've been stuck in a previous projects that use the
older versions,
> but now I'm using 0.9.2 and can't seem to echo from my
> controllers::actions().
> 
> I tested this theory by using a header location to http://google.com
> instead of an echo 'I come here'; and it worked. Is the
ZFW using some
> kind of output buffer?
> 
> It also only seem to have this behavior when I'm using

> :module:controller:action?

The dispatcher wraps calls to controller actions using
output buffering,
and appends any content in the buffer to the response
object. When the
response is finally sent, it should return any echo'd
content.

-- 
Matthew Weier O'Phinney
PHP Developer            | matthewzend.com
Zend - The PHP Company   | http://www.zend.com/

Re: echo?
user name
2007-04-23 06:29:05
Peter Pistorius пишет:

> Hello everyone,
> 
> I've been stuck in a previous projects that use the
older versions, but 
> now I'm using 0.9.2 and can't seem to echo from my
controllers::actions().
> 
> I tested this theory by using a header location to http://google.com 
> instead of an echo 'I come here'; and it worked. Is the
ZFW using some 
> kind of output buffer?
> 
> It also only seem to have this behavior when I'm using

> :module:controller:action?
> 
> Kind regards,
> Peter Pistorius
> 
> 
> 
You can disable buffering by :

$controller = Zend_Controller_Front::getInstance();
$controller->setParam('disableOutputBuffering',true);


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )