| Current Path : /home/bolconlineco/www/aaaaaa/coordinator/ |
| Current File : /home/bolconlineco/www/aaaaaa/coordinator/download.php |
<?php
ob_start();
if(isset($_GET['rfile']))
{
$file="../studentresult/".$_GET['rfile'];
$all=explode('.',$_GET['rfile']);
$mime=$all[1];
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header("Content-type: application/$mime");
header('Content-Length: ' . filesize($file));
readfile($file);
}
if(isset($_GET['file']))
{
$file="../uploadAssignment/".$_GET['file'];
$all=explode('.',$_GET['file']);
$mime=$all[1];
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header("Content-type: application/pdf");
header('Content-Length: ' . filesize($file));
readfile($file);
}
?>