Windows Media Player cannot play the file. The file is either corrupt or the Player does not support the format you are trying to play.
Here is My script
Expand|Select|Wrap|Line Numbers
- #!/usr/bin/perl
- use CGI;
- use CGI::Carp qw(fatalsToBrowser);
- my $cgi=new CGI;
- my $files_location;
- my $ID;
- my @fileholder;
- my $files_location = "c:/perl/";
- my $cFile = $cgi->param('file');
- if ($cFile eq '') {
- print "Content-type: text/html\n\n";
- print "You must specify a file to download.";
- } else {
- my $cFile=$files_location.$cFile;
- open(DLFILE, "<$cFile") || die "cannot open the File $! $cFile";
- @fileholder = <DLFILE>;
- close (DLFILE) || Error ('close', 'file');
- print "Content-Type:application/x-download\n";
- print "Content-Disposition:attachment;filename=$cFile\n\n";
- print @fileholder
- }
Please Help On this.
Thank In advance.
Regards
RajivGandhi