| name | language | licence |
|---|---|---|
| PHP : isset checkbox avant de le mettre dans une variable | Other | Other |
| PHP : forcer telechargement d'un fichier | PHP | Other |
| PHP : date en php | Other | Other |
| PHP : class mail | PHP | Other |
| PHP : expressions régulière | PHP | Other |
| PHP : detection ie6 et ie7 en php | PHP | Other |
| PHP : Boucle ecriture dans un fichier XML | PHP | Other |
| PHP : forcer telechargement d'un fichier | PHP | Other |
< 1 2 3 4 5 >
language: PHP
licence: Other
PHP : forcer telechargement d'un fichier
options: view full snippet • send to code collector
/*la page download.php*/
<?php
$chemin = $_GET['ch'];
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($chemin));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
/*nettoyage des tampon de sortie*/



library
html (48)