Help for this page

Select Code to Download


  1. or download this
    use Apache::SubRequest;
    my $subr = $r->lookup_file($file);
    ...
    return 200 if $r->header_only;
    $subr->run;
    $m->abort;
    
  2. or download this
    $r->content_type('application/octet-stream');
    $r->header_out('Content-disposition' => ("attachment;  filename=$filen
    +ame_base")); 
    ...
    while(<$fh>) { $m->print($_); }
    close $fh;
    return;