| Current Path : /home/bolconlineco/www/admin/ |
| Current File : //home/bolconlineco/www/admin/download.php |
<?php
ob_start();
if(isset($_GET['spid']))
{
$decode=urldecode($_GET['spid']);
// $file="../sportmaterials/".$_GET['spid'];
$file="../sportmaterials/".$decode;
header('Content-Type: application/octet-stream');
// $all=explode('.',$_GET['spid']);
$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['ed']))
{
$decode=urldecode($_GET['ed']);
// $file="../combine/coursematerials/".$_GET['ed'];
$file="../combine/coursematerials/".$decode;
header('Content-Type: application/octet-stream');
//$all=explode('.',$_GET['ed']);
$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);
}
?>