3 $SCRIPT_NAME = $ENV{'SCRIPT_NAME'} || $0;
4 $CGI = "file://$SCRIPT_NAME?";
6 if ($ENV{'QUERY_STRING'}) {
7 $file = $ENV{'QUERY_STRING'};
11 $file = &cleanup($file);
19 if (! open(FILE, "< $file")) {
20 $file = &html_quote($file);
21 $_ = "$file: " . &html_quote($!);
23 Content-Type: text/html
25 <head><title>$file</title></head>
31 $file = &html_quote($file);
32 ($dir = $file) =~ s@[^/]*$@@;
35 Content-Type: text/html
37 <head><title>$file</title></head>
43 s/^(\#\s*include\s+)(\".*\"|\<\;.*\>\;)/$1 . &header_ref($2)/ge;
56 return ""<a href=\"$CGI$dir$_\">$_</a>"";
69 -f "$d/$_" && return "<<a href=\"$CGI$d/$_\">$_</a>>";
83 s/[<>&"]/$QUOTE{$&}/g;