Guide Categories:  Home | Drivers | Web Development | Hardware | Internet | Q & A | Tips & Tricks | Write
Web Development Silicon Guide
Search SiliconGuide:

Site Services:
Log In
Sign Up

Guides:
Getting Sponsored
Using SSI

The Silicon Guide To
Using Server Side Includes

Executing CGI Scripts

It may often be necessary to invoke a CGI script, and perhaps insert the contents it returns, whenever a html document is loaded (perfect for cgi hit counters or banner rotators).  To do this, you can either use the EXEC or INCLUDE VIRTUAL command as follows.

<!--#exec cmd="LOCATION_OF_CGI_SCRIPT" -->

OR

<!--#include virtual="LOCATION_OF_CGI_SCRIPT"-->

where LOCATION_OF_CGI_SCRIPT is the path (either relative or full) to the location of the CGI script you with to execute.  Remember that the CGI script can be programmed in any language, such as Perl, C, AppleScript, etc...

You may also find that the EXEC command doesn't work on your server.   This is most probably due to the fact that, because of security issues, your administrator has disabled this dangerous command.  Just use the INCLUDE VIRTUAL method instead.

Next Page:
SSI Hosting and Conclusion

Home | Web Development | Hardware and Upgrading | Internet | Technical Questions & Answers | Tips and Tricks | Write to Us

Last modified on: Tuesday, 15-Oct-2002 12:44:20 EDT
Copyright © 1999 - 2008 Eric Georgieff, All Rights Reserved
Powered by Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 (More Info)