It will be more great if isn't necessary to create a temp file.

                $this->zip->addDirectory("archivos/");

                // adds files to directories, feed in the string (ascii or 
binary)
and then the dir+name of file
                $this->zip->addFile("THIS IS A TEST", 
"archivos/exampletext.txt");
                $this->zip->addFile("THIS IS TEST 2", 
"archivos/exampletext2.txt");

                $this->zip->forceDownload('prueba.zip');

Then forceDownload function will do a $data=$this->getZippedfile();
and echoes $data at the end


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

Reply via email to