Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#INCLUDE FILE="xx.asp" and #include virtual="/xx.asp" in .ht

Status
Not open for further replies.

Lucas68

Programmer
May 9, 2001
14
BR
Hi.
It is possible to use #INCLUDE FILE="xx.asp" and #include virtual="/xx.asp" in htm/html pages?

Thank you,

Lucas
 
Hi Daniel.
Thank you for your answer.
I have SSI enabled already.
But when I put this <!-- #include virtual=&quot;myfile.asp&quot; --> in a shtml page nothing appears. Checking the code I can see that the myfile.asp code is there(as plain text).

Lucas
 
If the source of the ASP page is shown, ASP isn't enabled on the server. //Daniel
 
It's enabled.
If I change the extension of the page from .shtml to .asp it works fine.
Here's the source code of the page:

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<HTML>
<HEAD>
<TITLE>Untitled Document</TITLE>
</HEAD>

<BODY BGCOLOR=&quot;#FFFFFF&quot;>
<!--#config timefmt=&quot;%A, %d de %B de %Y&quot; --> <!--#echo var=&quot;DATE_LOCAL&quot; -->
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;>
<tr>
<td width=&quot;50%&quot;>
<!-- TEST -->
<!-- #include virtual=&quot;/folder/myfile.asp&quot; -->
<!-- /TEST-->

</td>
</tr>

</table>
</BODY>
</HTML>


 
Are you using IIS? Because if you are, I think that IIS handles SSI differently than Apache, which is what I am used to. I think that in IIS, the include includes the file as plaintext before anything is done with it. Apache spawns a child process to get the document and therefore the document is parsed before it's inserted.
The conclusion is that you probbaly have to use the extension .asp on all the files that includes ASP. //Daniel
 
Yeah, my server uses Microsoft-IIS/5.0
 
Thank you Daniel.
I'll look around to see if there's a way to do include asp in html.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top