Part 3 - Including Scripts
Now suppose you want to make your site more dynamic. Say that you want a
self-updating date display on every page, or maybe you want your site to
sense what browser a visitor is using and set the layout accordingly, or
maybe you even want to use a script that will deliver specific content to a
person depending on where in your site they are.
This can all be accomplished by "including" CGI scripts into your HTML
Pages. It's really no different than using virtual includes to call HTML
fragments, but in this case you're calling a script to run using what's
called the exec cgi command (<!--#exec
cgi="/cgi-bin/directory/scriptname_ssi.cgi"-->). [You may have heard talk
that using SSI to call scripts opens your site to security risks, but
the truth is that using exec cgi to activate scripts is no more risky than
having any script running anywhere on your site. SSI is just another way of
accessing what's already there.]
|