15 lines
407 B
PHP
15 lines
407 B
PHP
<?php
|
|
include "phpdir.php";
|
|
|
|
if (!isset($file) || strlen($file) == 0) exit();
|
|
if (!is_file("$webdir/attachments/$file")) exit();
|
|
|
|
header('Pragma: public');
|
|
header('Expires: 0');
|
|
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
|
header('Cache-Control: private',false);
|
|
header('Content-type: unknown');
|
|
header('Content-Transfer-Encoding: binary');
|
|
readfile("$webdir/attachments/$file");
|
|
?>
|