I was checking out some stuff at php.net and this was in one of the comments for readfile()
http://us2.php.net/manual/en/functio...file.php#45908PHP Code:If you want to force a download:
<?php
$file = '/var/www/html/file-to-download.xyz';
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize($filename));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
?>
Might be helpful... hope it is...







Bookmarks