Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Include Files ? - Real Dumb Question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 07 April 2002 :  06:31:21  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
Hi folks,
I have a real dumb question. There isn't a HTML support forum so I am adding it here.

I know I can include files in asp :
<!-- #include virtual="somef.ile" -->
and this works fine.

I want to do the same in my .htm files. I have tried alot of things but can't seem to find a solution. I know it's something really simple but just can't seem to be able to put my finger on it!

Anyone got any ideas?

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 07 April 2002 :  06:43:35  Show Profile
Change the file extention from .HTM or .HTML to .ASP and it'll work.



http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 07 April 2002 :  13:55:15  Show Profile
Here is a page on SSI that may help.

http://www.bignosebird.com/ssi.shtml


======
Doug G
======
Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 08 April 2002 :  00:13:23  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
Can't change the file extensions from HTM / HTML to ASP. There has gotta be a way other then that.

I'll check out the link, thank you both for the replies.

Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 08 April 2002 :  00:20:11  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
I went through the link, everything I'm doing is fine according to the information there. The description on the link is mainly for Unix based servers, I wonder why the same does not work with NT ones.

Bottom line is, am still stuck with the problem.

Go to Top of Page

Bunce
New Member

Australia
84 Posts

Posted - 08 April 2002 :  00:55:29  Show Profile  Send Bunce an ICQ Message
Have you ensured that SSI is enabled on the server?

Are you using an extension that the server is configured to recognise as an include file (eg .shtml)?
(IIS Manager -> Default Web Site -> Properties -> Home Directory -> Configuration)

Andrew

======================================================
There have been many, many forum posts made throughout the world...
This was one of them!

Edited by - Bunce on 08 April 2002 00:58:52
Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 08 April 2002 :  05:17:32  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
Yup it had SHTML there. I have added .inc to it, with the same dll reference.

From what I understand is if I have a file called footer.inc and I want it to appear on the page default.htm, I have to have the .inc extension configured the way you had said. If that's the case then it should work fine.

I have even added .htm & .html extensions there. Sadly, it still does not solve the problem.

Edited by - Man[0]waR on 08 April 2002 05:51:39
Go to Top of Page

Bunce
New Member

Australia
84 Posts

Posted - 08 April 2002 :  05:54:55  Show Profile  Send Bunce an ICQ Message
Hmm, did you make sure that it was set to be processed by the sslinc.dll file?

Can't think of anything else.. perhaps show us the code you are using?

Cheers,

Andrew


======================================================
There have been many, many forum posts made throughout the world...
This was one of them!
Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 08 April 2002 :  07:13:36  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
Yup, they are set to that dll file. Here's the code, not much to it really:

<!-- #include virtual="incl.inc" -->


Go to Top of Page

Bunce
New Member

Australia
84 Posts

Posted - 09 April 2002 :  00:35:04  Show Profile  Send Bunce an ICQ Message
And whats the error you are receiving?
Are you running it from an ASP file or a HTML file?


======================================================
There have been many, many forum posts made throughout the world...
This was one of them!
Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 09 April 2002 :  00:45:58  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
Am using it in HTML files, it works like a charm with ASP pages. In the HTML files I get no errors. It just does not show the contents of the included file. As if the include statement isn't there.

Go to Top of Page

snaayk
Senior Member

USA
1061 Posts

Posted - 09 April 2002 :  13:01:07  Show Profile  Visit snaayk's Homepage  Send snaayk an AOL message  Send snaayk an ICQ Message  Send snaayk a Yahoo! Message
I think I had reda something somewhere that the page must be .shtml to process any include files. I didn't read the above article so that may have covered, just a thought.

Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 09 April 2002 :  13:33:38  Show Profile  Send ruirib a Yahoo! Message
As snaayk said I don't think you can use includes in HTML files. Also the page in that link Doug posted explicitly says that they use .shtml files to be able to include other files.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 10 April 2002 :  00:44:39  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
Thank you all for your helpful comments.

I got it to work , just like what Bunce said. You have to configure IIS to be able allow include files in HTML pages. I had done that but I guess you need to restart the server to get it to work. And it works !!

The reason why I couldn't rename the files was coz, I almost 3GB of html files that needed the include file, I didn't want to rename the files and redo the links and so on.

I found out the reason why HTML files do not have the include 'activated' is coz it takes longer for IIS to process it. So to improve on performance they have other extensions like SHTM and so on to do the includes.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07