Hello, I program a contract management software, where the contracts can be uploaded as pdf and later be viewd as a download.
Since not everybody should be able to see every contract I don't want to store the pdfs in the files directory of the webroot, but in another directory not directly accessible via the web frontend (I chose a subdirectory of my application directory). Then I want to offer the pdf as a temporary download. 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.... Does anyone have an idea how I can offer my file as a temporary download without getting the header trouble? Thank you in advance Anja --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---