| User Opinions |
100%
0%
(1 vote)
|
|
Thank you for rating this answer.
|
There are many good sites around
dedicated to things like SSI so you should search around for detailed
information and how-to's. Below is a simple example of how to get SSI
working on our servers.
Copy and paste this under your
'public_html' directory and call it test.shtml.
#### start of test.shtml ####
<HTML>
<HEAD>
<META HTTP-EQUIV="Pragma"
CONTENT="no-cache">
<TITLE>SSI TEST</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF"
marginheight="20" marginwidth="0" leftmargin="0"
topmargin="20">
<table border="0"
cellpadding="0" cellspacing="0" width="560"
align="center">
<tr>
<td align="center">
<p><b>
Server Side Includes test </b></p>
<p> </p>
<p> </p>
</td>
</tr>
<tr>
<td align="center">
<!--#exec
cgi="/cgi-bin/support-test.cgi"-->
</td>
</tr>
</table>
</body>
</html>
#### end of test.shtml ####
You may have already noticed the
'<!--#exec cgi="/cgi-bin/support-test.cgi"-->' line in
test.shtml. This line includes a cgi/perl script.
To get this test working we need to
create the cgi script under the "cgi-bin" directory so test.shtml can include it.
Copy and paste the follow into the file
called “ support-test.cgi” under your “cgi-bin” directory. Remember to set the permissions of support-test.cgi to be
executable.
### start support-test.cgi ####
#!/usr/bin/perl
use warnings;
use CGI qw(:standard);
print header(), start_html("test");
print "this is a test";
print end_html();
### end support-test.cgi ####
With both of these files in place you will
see that http://www.YOUR-REAL-DOMAIN-HERE.com/test.shtml
includes the script in its output displayed on your web browser.
|