hi,

I have an action to create a txt file and write stuff into.
Then I redirect to another action, where I have a simple template with
a download button.
On click, I would like to download the txt file, the name of the file
I pass within the url to the download function.

function download(){
        $this->view = 'Media';
        $params = array(
              'id' => $this->params['named']['do'].'.txt',
              'name' => 'example',
              'extension' => 'txt',
              'mimeType' => array('txt' => 'text/plain'),   // extends
internal list of mimeTypes
              'path' => WWW_ROOT.'/DTAfiles/'.$this->params['named']
['do'].'.txt'
       );
       $this->set($params);
}

But I get the message
Not Found
Error: The requested address '/members/download/040520111017' was not
found on this server.

I dont understand why this isn't working, what do I do wrong?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to