<?php
ob_clean();
$id = $_REQUEST["document_id"];
$document_name = utility::getTableFieldById("documents","document_name","id",$id);
$uploaded_file = "../document/".$document_name."";
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($uploaded_file).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($uploaded_file));
readfile($uploaded_file);
exit;
?>
