Forum Moderators: coopster
<?php
$filecontent="This is sample";
$downloadfile="test.txt";
header("Content-Type: plain/text");
header("Content-disposition: attachment; filename=$downloadfile");
header("Content-Transfer-Encoding: binary");
header("Pragma: no-cache");
header("Expires: 0");
echo"$filecontent";
?>
Thanks in advanced.
[edited by: coopster at 2:11 pm (utc) on May 17, 2006]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]
header("Content-Type: text/plain");