| Current Path : /home/bolconlineco/www/aaaaaa/demo/admin/ |
| Current File : /home/bolconlineco/www/aaaaaa/demo/admin/download.php |
<?php
ob_start();
if(isset($_GET['spid']))
{
$file="../sportmaterials/".$_GET['spid'];
header('Content-Type: application/octet-stream');
$all=explode('.',$_GET['spid']);
$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']))
{
$file="../combine/coursematerials/".$_GET['ed'];
header('Content-Type: application/octet-stream');
$all=explode('.',$_GET['ed']);
$mime=$all[1];
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header("Content-type: application/'$mime'");
header('Content-Length: ' . filesize($file));
readfile($file);
}
?>