Hi all,
some problems with using fpassthru. wanted to have a save-as box popup. it fails to have the pop-up box. Instead, it prints to the screen all the values in the file which is meant for download. Why?? I don't think it's anything to do with file permssion. Btw, the file attachment is in plain text.
my code as belows.. juz wondering why it fails as it works fine on other server. pls help.
header("Content-type: html/text");
header("Content-Disposition: attachment; filename=123.csv");
$fh = fopen("/path/to/file", "rw");fpassthru($fh);
Thanks in advance!
StaRy =)