Force download script
Posted: Sat Oct 18, 2008 1:44 am
i want to force a file to download instead of opening it in browser or acrobat...ny advice????
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . basename($filename));
readfile($filename);
exit;