6 require_once 'www-header.php';
7 $repo = new Repository();
8 $repo->loadFromRequest();
10 if (!isset($_GET['file']) || $_GET['file'] == '') {
11 throw new Exception_Input('File name missing');
14 $file = $repo->getFileByName($_GET['file']);
15 $mimetype = $file->getMimeType();
16 if ($mimetype === null) {
17 $mimetype = 'text/plain';
19 header('Content-Type: ' . $mimetype);
20 readfile($file->path);