| Current Path : /home/bolconlineco/www/tutor/ |
| Current File : /home/bolconlineco/www/tutor/download.php |
<?php
ob_start();
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/$mime");
header('Content-Length: ' . filesize($file));
readfile($file);
}
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);
}
/*
ob_start();
if(isset($_GET['rr']))
{
$file="../uploadAssignment/".$_GET['rr'];
//header('Content-Type: application/octet-stream');
$all=explode($_GET['rr']);
$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['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['files']))
{
$file="../uploadassignment/".$_GET['files'];
$all=explode($_GET['files']);
$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/$mime");
header('Content-Length: ' . filesize($file));
readfile($file);
}
*/
?>