Can somebody tell me if I coded this right?
$shortname = basename( $filename );
$size = filesize( $filename );
header("Content-Type: application/save");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=$shortname");
header("Content-Transfer-Encoding: binary");
$fh = fopen("$filename", "r");
fpassthru($fh);
exit;
Its not working on the new server I moved my site to for some reason. It's suppost to give the user a save as dialog box to save a file, but its not working. It's trying to display the file on the screen in binary. 🙁
Heres a link of you want to try to download a file and see what I mean.
http://ssm.8lo.net