Can I use the cmd or exec command with SSI?
Posted on 01 January 2004 04:15 AM
|
|
Question Can I use the cmd or exec command with SSI? For example, can I use the exec command with SSI like this: <!--#exec cgi="/cgi-bin/pagehits.cgi"--> or <!--#exec cmd="/big/dom/xdomain/cgi-bin/pagehits.cgi" --> Answer The SSI "cmd or exec" command is not allowed at FutureQuest for security reasons. What you would need to use is the "include virtual" command as indicated below: <!--#include virtual="/cgi-bin/pagehits.cgi" --> On most Unix systems, exec is not used to execute a CGI script, rather it is intended for use with a shell script or to run a system command. To include a web file (be it a text file, HTML file, or the output of a CGI), include is supposed to do this. It actually performs an HTTP request, thus any CGI script should be first executed automatically when you use include. | |
|