Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Include Virtual on IIS

    Hi

    I did not know where to post this, so feel free to tell me to move it.

    How do I implement <!-- #include virtual ="test.html" --> into a HTML page, with Internet Information Services, running on win XP.

    My server is working fine, I just can't seem to get the right settings, or the right code in my page, I am using
    <!-- #include virtual ="jake/test.html" -->

    Do i need to use a script tag?

    My test.html to include, what format does that need to be in, I read somewhere that I did not need to include head tags, is there any special code that needs to be included in this file?

    Does anyone know of any tutorials on this subject, that will break it down and explain it well enough for to understand why I am doing what?

    Thanks in advance

    Jake

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts

  • #3
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Managed to get it working, with

    <?php require_once('../pages/buttons_forpages.html'); ?>

  • #4
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    its not exactly complicated, you need to run it from a server side script, you chose php but you could have just done something like <!--#include file="../test.html" --> (relative) or <!--#include virtual="/directory/test.html --> (absolute(well, relative to the root dir really)) in asp but make sure the page you are running it from has an asp extention and it is not in the <%asp tags%>
    Last edited by ghell; 03-21-2004 at 02:05 PM.

  • #5
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I managed to do it, was doing it wrong because i was trying to inlcude in a PHP page.

    The thing i was unsure about was creating a virtual directory within my PC.

    No matter I done it now


  •  

    Posting Permissions

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