myvesta/web/download/file/index.php
2015-09-07 17:35:40 +03:00

15 lines
265 B
PHP

<?php
if (!empty($_REQUEST['path'])) {
$path = $_REQUEST['path'];
if (is_readable($path)) {
header("Content-disposition: attachment;filename=".basename($path));
readfile($path);
exit;
}
}
else {
die('File not found');
}
?>