Hello all,
 
I have been trying include a 'server side include' in a cgi script used to generate a 
html page with no success.  I have redirected the output from the script to a static 
html file which displays correctly in my browser (i.e. ssi configured ok) - so I'm 
thinking that either it can't be done, or my syntax is incorrect (refer below).  Note 
that there is no error message (to screen, or in the log files), though the include 
statement does exist in the source when viewed through my browser.
 
After searching far and wide I have been unable to locate any info/examples specific 
to this issue - possibly indicating that I'm going about this the wrong way (likely 
since I'm fairly new to perl/cgi).  At this point I have resolved to open a file 
handler and read in the html (vi print statements).
 
Any direction/assistance on the matter would be much appreciated.

 

#! /usr/bin/perl -w
         print "Content-type: text/html\n\n";
         print "<html><head>\n";
         print "<title>GuestBook Contents<\/title>\n";
         print "<!--\#include virtual=\"\/header.html\"--><br>\n";   NOT INCLUDED
         print "<\/head>\n";
         print "<body>\n";
         print "<h1>GuestBook Entries<\/h1>\n";
         print "<table border=\"1\" width=\"60%\">\n";
         print "<tr>\n";
         print "<th>Name<\/th>\n";
   print "<\/table>\n";
   print "<\/body>\n";
   print "<\/html>\n";

 

Thanks

 

Dale

Reply via email to