Skip to content

Instantly share code, notes, and snippets.

@enlacee
Created November 30, 2013 21:50
Show Gist options
  • Save enlacee/7724980 to your computer and use it in GitHub Desktop.
Save enlacee/7724980 to your computer and use it in GitHub Desktop.
Zend.revisar.php
// desargar archivo zend
public function registrationAction(){
$response = $this->getEvent()->getResponse();
$headers = new \Zend\Http\Headers();
$headers->addHeaderLine('Content-Type', 'application/pdf')
->addHeaderLine('Content-Disposition', 'attachment; filename="Anmeldung.pdf"')
->addHeaderLine('Content-Length', filesize("Anmeldung.pdf"));
$response->setHeaders($headers);
$response->setContent("Anmeldung.pdf");
return $response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment