Having problems with #include file="..."

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DarkJedi
    No Refunds Issued.
    • Feb 2001
    • 28301

    #1

    Having problems with #include file="..."

    it works only from the same directory - like if i put ads.html in www.site.com/dir1/

    but i want it to work from root - like put ads.html in www.site.com/


    any ideas why it wont work from root ?
  • RFlagg
    Confirmed User
    • Oct 2003
    • 128

    #2
    It would help to know what language you are trying to use this with...



    Programming/System Admin/Security
    ICQ 2 2 2 1 9 2 2 1 0

    Comment

    • Shooter
      Confirmed User
      • Apr 2001
      • 2842

      #3
      SSI includes right?

      Can you type out exactly how you're coding it, and where the files are respectively to each other

      Comment

      • DarkJedi
        No Refunds Issued.
        • Feb 2001
        • 28301

        #4
        Originally posted by Shooter
        SSI includes right?

        Can you type out exactly how you're coding it, and where the files are respectively to each other
        yeah SSI

        It works like this:
        <1--#include file="ads.html" -->


        But doesnt work like this:
        <1--#include file="../dir/ads.html" -->

        or like this:
        <1--#include file="www.site.com/dir/ads.html" -->

        Comment

        • Shooter
          Confirmed User
          • Apr 2001
          • 2842

          #5
          Originally posted by DarkJedi
          yeah SSI

          It works like this:
          <1--#include file="ads.html" -->


          But doesnt work like this:
          <1--#include file="../dir/ads.html" -->

          or like this:
          <1--#include file="www.site.com/dir/ads.html" -->
          Hmm, as long as the files are in the right locations I don't notice anything wrong there.

          Comment

          • Viper2K1
            Confirmed User
            • Aug 2001
            • 1006

            #6
            use include virtual instead of include file
            Spank me
            Dude, where's my traffic?

            Comment

            • Nathan
              Confirmed User
              • Jul 2003
              • 3108

              #7
              Originally posted by DarkJedi
              yeah SSI

              It works like this:
              <1--#include file="ads.html" -->


              But doesnt work like this:
              <1--#include file="../dir/ads.html" -->

              or like this:
              <1--#include file="www.site.com/dir/ads.html" -->
              Hey, try virtual= instead of file=

              ie,
              <!--#include virtual="../ads.html" -->
              "Think about it a little more and you'll agree with me, because you're smart and I'm right."
              - Charlie Munger

              Comment

              • DarkJedi
                No Refunds Issued.
                • Feb 2001
                • 28301

                #8
                thanks guys, it worked

                Comment

                • Doc911
                  Confirmed User
                  • Feb 2004
                  • 3695

                  #9
                  Originally posted by DarkJedi
                  yeah SSI


                  <1--#include file="www.site.com/dir/ads.html" -->
                  try <1--#include file="HTTP://www.site.com/dir/ads.html" -->


                  For PHP/MySQL scripts ICQ 161480555 or email [email protected]

                  Comment

                  Working...