Question: I'm almost done with customizing a "simple scerch" result page and im trying to display a ssi-file <viritual include>. Is that posible? The result page is /search.cgi - does it have to be and shtml for the file to display?
I don't think you'll be able to convince the web server to evaluate a server-side include as it is produced by a cgi app.
I believe the web server will expect your cgi code to do the include itself.... which is pretty straight forward...
Code:
&include_this('./ssi_file.html');
sub include_this {
my $file_path_name = shift or
die "No file requested.\n";
open(IPF,"<$file_path_name") or
die "Failed to open SSI file, $!\n";
while (<IPF>) { print; }
close IPF;
}
'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.