Je veux connaitre l'entete html pr download
pedro
-
Siluni -
Siluni -
Bonjour, je suis debutant en php et html et jaimerais connaitre l'entete php pr download un fichier qui est sur mon bureau. a partir de ce code que j'ai compris partiellement...
if($toto=$_GET["toto"]) {
$toto= str_replace("../","",$toto);
// ob_clean(); // Vide le buffer (v >= 4.2)
// Dialogue de téléchargement
header("content-type: application/octet-stream");
// seulement pour application/octet-stream !
header("Content-Disposition: attachment; filename=".$toto);
// Ouvrir avec MSWord
// header("content-type: application/msword");
readfile($toto); // Envoie le fichier
} ?>
Merci danvance
if($toto=$_GET["toto"]) {
$toto= str_replace("../","",$toto);
// ob_clean(); // Vide le buffer (v >= 4.2)
// Dialogue de téléchargement
header("content-type: application/octet-stream");
// seulement pour application/octet-stream !
header("Content-Disposition: attachment; filename=".$toto);
// Ouvrir avec MSWord
// header("content-type: application/msword");
readfile($toto); // Envoie le fichier
} ?>
Merci danvance
A voir également:
- Je veux connaitre l'entete html pr download
- Editeur html - Télécharger - HTML
- Microsoft store download - Guide
- Télécharger music mp3 gratuit download pc - Télécharger - Conversion & Extraction
- Canva download - Télécharger - Divers Photo & Graphisme
- Word 2013 free download - Télécharger - Traitement de texte