[thelist] saving txt files

Charles Cattell ccattell1 at hotmail.com
Mon Jul 7 10:46:47 CDT 2003


i use the following code to create a txt file and it works fine, but now i
need to know how to make this file automatically ask to download to a local
desktop, any suggestions?

<?
$variable = "test" .time();
$path = "My path here";
$filename = "$variable" . "_file.txt";



if(!file_exists($filename)){
 $file = fopen("$path$filename","w");
 fwrite($file,"This is where the contents of the text file goes");
 fclose($file);
}
?>


More information about the thelist mailing list