in reply to #exec in SSI

You probably should never use exec to include any other file. I don't know about IIS, but unless it is b0rked (*gasp* not IIS!), it should have something like this to use instead:
<!--#include virtual="/cgi-bin/mycode.pl" -->

You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

Replies are listed 'Best First'.
Re: Re: #exec in SSI
by jimac (Initiate) on May 08, 2002 at 10:04 UTC
    But I'm not trying to include it, I'm trying to execute it!

    #include won't execute the file.....

    Jim.

      The virtual directive is intended to be the smart way to include information into a page. Whether its a page or a program you are still attempting to 'include' its output into your page. The advantage to using virtual is that you can use files or programs without having to change the whole of your include statement.

      Its also a little securer.

      Now I know apache supports both and so does IIS, but as to whether you can include CGI apps in a 'shtml' page on IIS - well thats one to look to MS about.
      #include executes the file and then includes the output. I've used it that way many times.

      John
        Not in IIS it doesn't. I've tried.

        If mycode.pl contains:

        print "this is from the included .pl file<br>\n";
        What you get in the HTML from the server (displayed in the browser) is:
        print "this is from the included .pl file<br>\n";
        The perl doesn't get executed, just the contents of the file get included.

        Jim.