Hallo,
hab es nun so gemacht
function makeDownload($file, $dir, $type)
{
header("Content-Type: $type");
header("Content-Disposition: attachment; filename=\"$file\"");
readfile($dir.$file);
}
$dir = 'kalender/2015/pdf/';
$type = 'application/pdf';
if(!empty($_GET['file']) && !preg_match('=/=', $_GET['file']))
{
if(file_exists ($dir.$_GET['file']))
{
makeDownload($_GET['file'], $dir, $type);
}
}
Die Datei wird zwar herunter geladen allerdings kann ich die nicht mehr öffnen, es kommt folgender Hinweis: