Hi
I have text files which I want to download from my website.
I feed the id of the text file to a PHP file:
$filesize = filesize($thetextfile);
header('Content-Disposition: attachment; filename=\"thenewfile.txt\"');
header('Content-Type: application/force-download');
header('Content-Length: $filesize');
header('Content-Transfer-Encoding: binary');
readfile($thetextfile);
The problem is that the file once downloaded is ZERO length.
Can anyone help me please?
Thanks