Thread Download mittels -type=>'application/octet-stream' (7 answers)
Opened by bieber at 2009-01-16 10:50

GwenDragon
 2009-01-16 12:40
#118075 #118075
User since
2005-01-17
14761 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
use File::Basename;

my $db = $cgi->url_param('db');
my $datei = $cgi->url_param('datei');

download("/fester_pfad/".$db."/".$datei);

sub download {
my $file = shift;
my $fn = fileparse($file);
print $cgi->header(-type=>'application/octet-stream',-attachment=>$fn);
}


So ist es besser mit einem Standardmodul ;)

View full thread Download mittels -type=>'application/octet-stream'