#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    17
    Rep Power
    0
    Is there any way to include other files in a cgi script? My aim is to have an SSI statement that executes properly when outputted from withtin a cgi script. Is this possible, or do i have to manually open and output the file's contents?

    Also, is it possible to call another cgi script from within a cgi script? Thanks, and i apoligise for this being entirely about cgi and not perl
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    82
    Rep Power
    15

    In my experience with Apache, you can not output Server Side Includes from a CGI. That is to say that you CAN spit the text out, but they will appear simply as comments.

    > Also, is it possible to call another cgi script from within a cgi script?

    That depends. If you want to access some function or sub, you can break it out into a "whatever.pl" file, then just do:

    require "./whatever.pl"

    in both the programs to access that sub. If you catually want to trigger another script to execute, you can use backticks. I dunno if STDOUT gets bunged up in CGI context when you do that, though.

    Good luck.


  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    17
    Rep Power
    0
    Thanks JSchoof

IMN logo majestic logo threadwatch logo seochat tools logo