Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->setLayout(false);
- sfConfig::set('sf_web_debug', false);
- $this->getResponse()->setHttpHeader('Content-Type', 'text/csv');
- $this->getResponse()->setHttpHeader('Content-Disposition', 'attachment; filename="file.csv"');
- $this->getResponse()->setHttpHeader('Pragma', 'no-cache');
- $this->getResponse()->setHttpHeader('Expires', '0');
- readfile(sfConfig::get('sf_upload_dir') . "/export/file.csv");
- return sfView::NONE;
- $this->getResponse()->setHttpHeader('Content-Type', 'application/csv');
- $this->redirect('/uploads/export/file.csv');
- $this->getResponse()->clearHttpHeaders();
- $this->getResponse()->setHttpHeader('Content-Description','File Transfer');
- $this->getResponse()->setHttpHeader('Content-Type', 'application/csv');
- $this->getResponse()->setHttpHeader('Content-Disposition','attachment;filename='.$file_name);
- $this->getResponse()->setHttpHeader('Pragma', '');
- $this->getResponse()->setHttpHeader('Cache-Control', '');
- $this->getResponse()->sendHttpHeaders();
- $this->renderText($fwrite('php://output',$stuff));
Add Comment
Please, Sign In to add comment