Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member jayell's Avatar
    Join Date
    Sep 2004
    Posts
    21
    Member #
    7685
    I'm just learning to use includes (simple virtual includes for now .. don't get fancy). Everything works fine when all the shtml files and the include files are in one directory .. but when I start adding complexity to the file structure (adding folders) nothing works anymore. Do the includes have to be in every folder? I know that doesn't make sense .. but after trying numerous variations, I can sometimes get the includes to be processed, but can't get the include that provides the navigation to find the other files. I don't suppose there's a simple answer ..

    Appreciate any assistance .. or pointing me to resources that might give me some guidance.

    Jayell

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    if you use <!-- Include File="" --> your includes are relative to the path of the including file. if you use <!-- Include Virtual="" --> the includes are relative to the root.

    So say you have a folder called /includes with an inc called includeMe.inc and your files are in the root. You can do this:

    <!-- Include File="includes/includeMe.inc" -->

    or

    <!-- Include Virtual="includes/includeMe.inc" -->

    Case 2: your files are in a folder called /files and your includes are in a folder called includes, now your includes will look like this:

    <!-- Include File="../includes/includeMe.inc" -->

    or

    <!-- Include Virtual="includes/includeMe.inc" -->

    Hope this makes sense.

  4. #3
    Junior Member jayell's Avatar
    Join Date
    Sep 2004
    Posts
    21
    Member #
    7685
    Yes, it does make sense. Thanks for the input, Steve. Figured out I had everything coded correctly. Just forgot that I was using a sub-directory on my test server to test in .. which screwed up the 'root relative' paths :-)

    Jayell


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:44 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com