Hi realien,

If you are using the above code, and /NOT/ getting "header already
sent" errors (you have debug set > 0, right?) The only answer is that
your content_for_layout starts with a space. If you are getting an
error message, it's worth reading - especially the bit where it tells
you the file and line that started sending stuff to the browser :).

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :)
You may get your answer quicker by asking on the IRC Channel (you can
access it with just a browser here: http://irc.cakephp.org).

On Nov 15, 6:43 am, "realien" <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> We've created a REST based webservice with cake, and when we set the
> layout of the controller to var $layout = 'xml';   and we have views
> for each of the actions on the controller that wil render the xml.
>
> <code>
> <?php
> /* turn off browser caching */
> header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
> header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
> header( "Cache-Control: no-cache, must-revalidate" );
> header( "Pragma: no-cache" );
> header( "Content-Type: text/xml" );
> echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
> echo $content_for_layout;
> ?>
> </code>
>
> What we are seeing is we always get 1 or 2 blank lines at the top of
> the xml rendering, which firefox complains about when the xml is served
> (IE puts up with it).
>
> We've checked our php files for lead or trailing blank lines and there
> are none.  Has anyone else seen this issue?


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to