and only#!/usr/bin/perl -w use strict; use warnings; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $updated = ""; ## set up the HTML page with the header and title lines print header; # start HTML head print start_html("Download page"); # print title bar with string print <<ENDH; Content-type: application/octet-stream Content-Disposition: attachment; filename: $updated ENDH open FILE,"<updated/$updated" or die "Can't open: $!"; binmode FILE; local $/ = \10240; while (<FILE>) { print $_; } close FILE; print end_html;
in the other file. Is this right.print('<a href="download.cgi?file=$updated">Download Files here</a>');
It comes out with an error message, simply $updated not defined. How do i pass the file name and its contents through to this download.cgi script without having to declare it at the top.
Cheers.
In reply to Re: Download File using CGI
by MonkPaul
in thread Download File using CGI
by MonkPaul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |