Possible Duplicate:
Forcing to download a file using PHP
If I have a json in a variable, how can I force the download? (The file not exist).
Thanks.
header('Content-disposition: attachment; filename=file.json');
header('Content-type: application/json');
echo $json;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With