2010-11-09 5 views

Répondre

10

Cela donnera à l'utilisateur une invite de téléchargement:

<?php                 
header('Content-type: text/plain');        

// What file will be named after downloading         
header('Content-Disposition: attachment; filename="abc.txt"'); 

// File to download         
readfile('abc.txt');            
?> 
0

Utilisez l'en-tête Content-Disposition:

header('Content-Disposition: attachment; filename="abc.txt"'); 
readfile('abc.txt'); 

Assurez-vous d'envoyer l'en-tête Content-Type approprié ainsi.

0

Vous devez passer les en-têtes à droite:

header("Content-disposition: Atachment"); 
Questions connexes