Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ssi-file on search result page - posible?

Status
Not open for further replies.

toias

IS-IT--Management
Sep 4, 2002
19
SE
Hi

Question: I'm almost done with customizing a &quot;simple scerch&quot; 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 &quot;No file requested.\n&quot;;
    open(IPF,&quot;<$file_path_name&quot;) or 
        die &quot;Failed to open SSI file, $!\n&quot;;
    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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top