par
kpn59 » 04 juin 2007, 09:32
Voici donc le code nécessaire pour ouvrir une archive ZIP et un document pdf.
header("content-type: application/zip");
//header("Content-Disposition: inline; filename=selection.zip"); //force le téléchargement
header("Content-Disposition: attachment; filename=selection.zip"); //laisse le choix à l'utilisateur
header("Content-Transfer-Encoding: binary");
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header("Expires: 0");
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename=doc.pdf');
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header('Pragma: anytextexeptno-cache', true);
header('Cache-control: private');
header('Expires: 0');
Voici donc le code nécessaire pour ouvrir une archive ZIP et un document pdf.
[php]
header("content-type: application/zip");
//header("Content-Disposition: inline; filename=selection.zip"); //force le téléchargement
header("Content-Disposition: attachment; filename=selection.zip"); //laisse le choix à l'utilisateur
header("Content-Transfer-Encoding: binary");
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header("Expires: 0");
[/php]
[php]
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename=doc.pdf');
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header('Pragma: anytextexeptno-cache', true);
header('Cache-control: private');
header('Expires: 0');
[/php]