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