I am writing a small CGI script wherein the script will list all the files in a directory. I am able to list the files successfully but i am also trying to provide a link to the files which seems to have some problem.
In the below code, i have just showed the section where i provide the link to the file because i am able to get the list of files in the directory successfully
#!C:/Strawberry/Perl/bin/perl.exe use strict; use warnings; use diagnostics; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $cgi=new CGI; print $cgi->header(); print $cgi->start_html("My Submissions"); print "<body bgcolor=#c0c0c0>"; #Link to a sample file in the directory print "<h3><a href=\"file:///c:/temp/g.venkatesan/upload/test.txt\">Le +on</a></h3><br>"; print "</body>"; print $cgi->end_html();
The problem with this is, when i click on the link, the corresponding file is not opening. Infact, nothing is happening. But when i copy and paste the same link in a browser, the file is opening.
Could someone help me out with this issue? I have tried the code in both IE6 and Firefox 3.5.3
Thanks in advance!!!In reply to Problem linking a file in CGI script by venkatesan_G02
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |