// //habrahabr.ru/post/151795/
function file_force_download($file) {
if (file_exists($file)) {
header('X-SendFile: ' . realpath($file));
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . basename($file));
exit;
}
}