lots of tech info here

SSI Includes

How to embed CGI scripts in HTML files

In order to embed CGI scripts, first find if your web hosting company supports Server Side Include (SSI). Call or email your tech support to find this. [If you're hosting on Bluehost, yes they support SSI]

AddType text/html .html
AddHandler server-parsed .html

Testing the SSI include

Lets create a file called ssi.html that embeds a Perl script date.pl. This Perl script outputs the current date and time when executed.

<h1>SSI Test</h1>

<!--#exec cmd="date.pl"-->
#!/usr/bin/perl -w

print `date`;
<h1>SSI Test</h1>

<!--#include virtual="/demo/date.pl"-->


Check out the working demo here.

Updated on 01 Jan 2007 {Created on 02 Jan 2007}

TAGS: ssi, apache, cgi

If you liked this article, subscribe to our Feed, follow us on Twitter (@aruljohn) and/or join our Facebook Page.

Share this with Others