Written by georg
on April 12, 2016
You have a variable in php which should get into a file for download. But you don’t want to put it actually into a file? Then call the following script which does exactly that for you:
$filename=htmlspecialchars($_GET["name"]); $content=$_GET['content']; header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=$filename"); echo("$content");
Schreibe einen Kommentar