
japhy
Enthusiast
Dec 15, 2000, 3:30 PM
Post #4 of 4
(408 views)
|
|
Re: Using require/SSI in CGI scripts
[In reply to]
|
Can't Post
|
|
CGI program cannot produce SSI directives -- at least, it can, but the server will not parse the directives. 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:
open FILE, "file/to/read.txt" or die "can't read file/to/read.txt: $!"; print while <FILE>; close FILE; The other SSI directives have pretty simple translation into the general algorithm behind them, and they're pretty easy to implement in Perl. Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author
|