in reply to Re: Why I can not acess files outside cgi-bin directory?
in thread Why can I not acess files outside cgi-bin directory?
Thanks a lot.#!c:/perl/bin/perl -w use CGI; # only files in cgi-bin directory works? #filename = "C:\\Program Files\\Apache Group\\Apache2\\htdocs\\project +s\\Generate_Conc_xls\\test.txt"; $filename = "test.txt"; $header1 = "Content-disposition: attachment; filename=$filename\n"; $mime_type = "application/octet-stream"; #print header for downloading file to client print $header1; print "Content-Type: $mime_type\n\n"; #print content to client file open (READ, "<$filename"); binmode READ; local $/; print <READ>; close(READ);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why I can not acess files outside cgi-bin directory?
by skx (Parson) on Mar 24, 2005 at 22:05 UTC | |
by perlfeng (Initiate) on Mar 24, 2005 at 22:19 UTC | |
by nobull (Friar) on Mar 25, 2005 at 09:38 UTC |