Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$target_file="filepath"; print "Content-Type: application/x-unknown\n"; print "Content-Disposition: attachment; filename=$flid\n\n"; $output_file = read_file($target_file); print $output_file; sub read_file { local($fname) = @_; local($content); open(FILE, "<$fname") || print "cannot open ".$!; while(<FILE>) { $content .= $_; } close(FILE); return $content; }
vy01hc jy02vl hr80je tx92fs qs13kj kk96bg bw95oz st81lv zh64yz vg27tp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Downloading file
by Corion (Patriarch) on Feb 07, 2004 at 10:59 UTC | |
by Anonymous Monk on Feb 07, 2004 at 11:08 UTC | |
by Anonymous Monk on Feb 10, 2004 at 14:45 UTC | |
|
Re: Downloading file
by Roger (Parson) on Feb 07, 2004 at 11:36 UTC | |
|
Re: Downloading file
by CountZero (Bishop) on Feb 07, 2004 at 11:20 UTC |