Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
class DestinationHTTP extends Destination {
3
  function DestinationHTTP($filename) {
4
    $this->Destination($filename);
5
  }
6
 
7
  function headers($content_type) {
8
    die("Unoverridden 'header' method called in ".get_class($this));
9
  }
10
 
11
  function process($tmp_filename, $content_type) {
12
    header("Content-Type: ".$content_type->mime_type);
13
 
14
    $headers = $this->headers($content_type);
15
    foreach ($headers as $header) {
16
      header($header);
17
    };
18
 
19
    // NOTE: readfile does not work well with some Windows machines
20
    // echo(file_get_contents($tmp_filename));
21
    readfile($tmp_filename);
22
  }
23
}
24
?>