I now simply wrote
header("Content-Type: text/plain");
header('Content-Disposition: attachment; filename="text.txt"');
into my controller - that seems rather dirty, but it works.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
Yo
> I just wrote a quick PlaintextHelper (3 minutes!) based on the
> CsvHelper I'm already using. Check it out here:
>
> http://pastebin.com/u46cWX7T
Well it does not work, header is still html.
I also do not understand why it should work. The only thing you are
doing is taking elements/users/txt_d
On Apr 16, 7:37 am, Melanie Sommer
wrote:
> > Because the View class uses output buffering. Have a look at MediaView
> > instead:
>
> Thank you; but I am afraid I did not figure out how this helps me
>
> MediaView Summary:
> "Methods to display or download any type of file"
>
> I do not want to di
> Because the View class uses output buffering. Have a look at MediaView
> instead:
Thank you; but I am afraid I did not figure out how this helps me
MediaView Summary:
"Methods to display or download any type of file"
I do not want to display or download a file as there exists no file.
The cont
On Apr 12, 2:51 pm, Melanie Sommer
wrote:
> I want to have the output as plain text offered with a download
> dialog.
>
> This works fine on my server with a .php file outside of cake that
> looks like
> header('Content-Disposition: attachment; filename="test.tex"');
> echo "aa\n\na\ta\ta?>
>
> I
I want to have the output as plain text offered with a download
dialog.
This works fine on my server with a .php file outside of cake that
looks like
In cake I create a new layout in views/layouts/tex.ctp
content:
in my controller I wrote
Configure::write('debug', '0');
$this->render(null,'tex