On Fri, May 9, 2008 at 2:25 PM, acl68 <[EMAIL PROTECTED]> wrote:

>
> Normally soemone would do it like this:
> header("Content-Type: x-type/subtype");
> header("Content-Length: ".filesize($file));
> header("Content-Disposition: attachment; filename=".$file);
>
> readfile($file);
>
> But of course with MVC in CakePHP I get the error messages:
> Warning: Cannot modify header information - headers already sent
> by....
>
>
Hmmm.... this should work as above

#1 Add $this->autoLayout = false;
#2 Which file is sending the header? it probably has a blank like after the
closing tag - remove the closing tag in the offending file
#3 Use HTTPLiveheaders extension in firefox to see the headers

HTH

Tarique



-- 
=============================================================
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=============================================================

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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