Working with Include Files

Results 1 to 3 of 3

Thread: Working with Include Files

  1. #1
    Join Date
    Dec 1969

    Default Working with Include Files

    I am building a web application that uses 3 include files to build the template of the overall site. One that goes in the header, one for the start of the page, and one for the end. They reside in the &#060;root&#062;/includes directory.<BR><BR>I am looking for an easy way to include these files into each page, no matter what directory they reside in. So far I am just specifying the directory using the include "file". This changes for each directory level that I go up or down.<BR><BR>Is there an easier way to do this or do I have to specify each one.<BR><BR>Is there anyway to dynamically include a file?<BR><BR>Thanks

  2. #2
    Herophant Guest

    Default RE: Working with Include Files

    &nbsp;<BR>cant you just use virtual?<BR><BR>&#060;!-- #include virtual="/myinclude.asp" --&#062;<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Working with Include Files

    Hey umm you need to use &#060;!--#include virtual="/yourfile.asp"--&#062;<BR><BR>Heres how it works. When you use include virtual it assumes that the start directory is the root directory of your website. so lets say your root is c:inetpubwwwroot. lets say that your include scripts are in c:inetputwwwrootincludes. Then you simply need &#060;!--#include virtual="/includes/yourfile.asp"--&#062;. Now no matter what directory your script is in as long as you use that include it will know where it is.

Posting Permissions

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