Dec 15, 2000, 3:30 PM
Post #4 of 4
CGI program cannot produce SSI directives -- at least, it can, but the server will not parse the directives.
Re: Using require/SSI in CGI scripts
[In reply to]
It is silly, though, for a CGI program to rely on SSI -- there shouldn't be anything you need to use SSIs for in a CGI program. If you want to include a file as output, merely open it and print its contents:
The other SSI directives have pretty simple translation into the general algorithm behind them, and they're pretty easy to implement in Perl.
open FILE, "file/to/read.txt" or die "can't read file/to/read.txt: $!";
print while <FILE>;
Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author