Print Page | Close Window

How to include files??

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=13108
Printed Date: 29 March 2026 at 2:54pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How to include files??
Posted By: PrivateEye
Subject: How to include files??
Date Posted: 24 December 2004 at 4:58pm
I have files named top_menu.inc and left_menu.inc so that to reduce the work when I change the navigation structure of my website. I am including top_menu.inc file as

<!--#include file="top_menu.inc"-->
but contents of this file are not displaying on the page in which it is inserted. If there is a missing relative or virtual path of file, please tell me how can I give virtual or relative path. Thanx


-------------
The Judgement Day



Replies:
Posted By: Mart
Date Posted: 24 December 2004 at 5:03pm
<!--#include virtual="top_menu.inc"-->


Posted By: PrivateEye
Date Posted: 24 December 2004 at 5:26pm
still not working...in the browser-> view source, the tag is present there as  <!--#include virtual="top_menu.inc"--> nothing is done. any other solution??

-------------
The Judgement Day


Posted By: dj air
Date Posted: 24 December 2004 at 6:11pm
this is a cut and past so should work.

<!--#include file="functions/functions_format_post.asp" -->

the only other thing i can think is .. have you got SSI enabled on your host.

should have but some hosts allow you to disable them.


Posted By: PrivateEye
Date Posted: 24 December 2004 at 6:18pm
Ok, but I am using it on my local server, with Win 2000 Professional and IIS 5. Would you pls tell me how can I check SSI on my local system.

-------------
The Judgement Day


Posted By: dpyers
Date Posted: 24 December 2004 at 11:26pm
I use include virtual instead of include file
<!--#include virtual="/somedirectory/top_menu.inc"-->
Where the first / is the root directory. That way I can use the same include in any subdirectory without having to change the relative file path.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Agni
Date Posted: 31 December 2004 at 6:28am
Just a thought, but make sure you are not tring to using the 'include' statement within the asp brackets : <% %>

Nathan


-------------
www.agni.gr
Travel To Greece Guide



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net