The internal server of OptiPerl does not support SSI. However you can use apache as an external server for offline testing. Create in the \htdocs folder a file named ".htaccess" (notice the starting dot) with the following text:

 

AddHandler server-parsed .shtml

Options +Includes

 

Now all html files added in this folder that have an shtml extension will be SSI enabled. For example:

 

1) Copy the "hello.cgi" script into the \cgi-bin folder of apache

2) create a file named "hello.shtml" in the \htdocs folder with the following text:

 

<html>

Running an SSI<p>

<!--#exec cgi="/cgi-bin/hello.cgi" -->

</html>

 

You should see the following output when running the shtml file (make sure apache is running)

 

Running an SSI

Welcome to OptiPerl!

 

 

 

Top  Previous  Next