INCLUDE problems with SHTML and ASP

Results 1 to 2 of 2

Thread: INCLUDE problems with SHTML and ASP

  1. #1
    Join Date
    Dec 1969

    Default INCLUDE problems with SHTML and ASP

    To all -<BR>Any help on the following would be greatly appreciated:<BR><BR>I&#039;m having some problems getting some INCLUDE statements to work like I want them to. I&#039;ve got a small Perl script that displays the current weather that I&#039;d like to use for a website. In order for the script to run, I have to use the following line in an SHTML page:<BR>&#060;!-- #exec cgi="/cgi-bin/weather.cgi?template=example.html" --&#062;<BR><BR>I have this line ONLY in a page titled weather.shtml. I have another page titled "sample.asp" and am using a <BR>&#060;!-- #include file="weather.shtml" --&#062; statement but the statement is no executing -- I&#039;m only seeing that commented line (not the "#include file" line but the "#exec cmd..." line). My ASP code that I have in there displays correctly, but nothing from the SHTML page does. If I type in "weather.shtml" into a browser, the script executes and the weather is displayed. <BR><BR>A similar thing happens if I reverse the code: if I put a #include file="sample2.asp" line into my SHTML page, I just see whatever ASP code is on the sample2.asp page, it&#039;s not actually run by the server.<BR><BR>Is there a way to get around this? Any advice would be VERY helpful. Thanks in advance.

  2. #2

    Default RE: INCLUDE problems with SHTML and ASP<BR>The bad news is that, in general, ASP and SSI don’t mix. You can use one technique or the other, but not both together, because the special file extension for SSI files (.stm) doesn’t give the ASP interpreter a chance to see the file as well. However, one SSI command is available in ASP, and will execute successfully within an ASP page. This is the #include directive.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts