will somebody please tell me what is the correct way to dowload a file from the server to the client. should i use the copy function or maybe the ftp_get function
i tried the following code
<?php
$file = 'abc.ram';
if (isset ($file)) {
header ("Content-type: application/octet-stream");
header ("Content-Disposition: attachment; filename=$file");
header ("Content-Transfer-Encoding: binary");
$fileData = fopen ("$file" , "rb");
fpassthru ($fileData);
echo 'end of TEST download';
}
?>
allit did was open the file and display it in the browser.
this should be so frikken simple
does anybody have some simple clear to understand code?