What are the contents of $type? When opening the file directly, the browser
will probably use the specified $type information, as opposed to the
explorer using the file extension when the user saves it to disk, so the
problem may be that $type is not correct... ;)
HTH,
Fernando Madruga
-Or
Well, I tried using different code (from a newer message by Mukul
Sabharwal):
header("Content-length: $size");
header("Content-type: $type");
$fp = fopen($actualfile, 'rb') or print('Could not open file!');
$read = fread($fp, $size) or print('Could not read file');
print($read);
and this seems