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
<?php header("Content-Type: text/plain");
header('Content-Disposition: attachment; filename="test.tex"');
echo "aa\n\na\ta\ta?>

In cake I create a new layout in views/layouts/tex.ctp
content:
<?php header("Content-Type: text/plain");
header('Content-Disposition: attachment; filename="english.tex"');
echo $content_for_layout; ?>

in my controller I wrote
Configure::write('debug', '0');
$this->render(null,'tex');

and in the view the content.

But it does not work, cake uses the layout, but seems to ignore the
header command. Output is sent as text/html.

Why -- and how can I change that.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to