Include Files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Earl Partridge

    Include Files

    FP 2000
    I have a single Include file that I want to use on multiple sites. I'm trying to use the
    following (or some variation) but can't make it work.

    <!--#INCLUDE FILE="www.myoth ersite.com/FavLinks.inc"-->

    Earl

  • McKirahan

    #2
    Re: Include Files

    "Earl Partridge" <earlpNG@pearne t.comwrote in message
    news:OEahP0tNIH A.4712@TK2MSFTN GP04.phx.gbl...
    FP 2000
    I have a single Include file that I want to use on multiple sites. I'm
    trying to use the following (or some variation) but can't make it work.
    >
    <!--#INCLUDE FILE="www.myoth ersite.com/FavLinks.inc"-->
    The following is from:
    <URL:http://www.hardcoder.c om/scripting/php/include_files.p hp>

    How to Use Include Files in ASP

    There are two ways to include files in ASP. With the "include file"
    or "include virtual" options. "Include virtual" tells ASP where the
    include file is relative to the web root directory, "include file" tells
    ASP where the file is relative to the current directory. Use either
    of the following tags to include files in ASP:

    <!-- #include virtual="/includes/header.asp" -->
    (tells ASP where the file is located relative to the root web directory)

    <!-- #include file="../includes/header.asp" -->
    (tells ASP where the file is relative to its current directory)


    Comment

    • Dooza

      #3
      Re: Include Files

      Earl Partridge wrote:
      FP 2000
      I have a single Include file that I want to use on multiple sites. I'm
      trying to use the
      following (or some variation) but can't make it work.
      >
      <!--#INCLUDE FILE="www.myoth ersite.com/FavLinks.inc"-->
      >
      Earl
      >
      I don't know if you can include external files from other websites.

      Steve

      Comment

      • Mike Brind

        #4
        Re: Include Files


        "Dooza" <steveNO@SPAM.d ooza.tvwrote in message
        news:uVzHXkyNIH A.484@TK2MSFTNG P06.phx.gbl...
        Earl Partridge wrote:
        >FP 2000
        >I have a single Include file that I want to use on multiple sites. I'm
        >trying to use the
        >following (or some variation) but can't make it work.
        > <!--#INCLUDE FILE="www.myoth ersite.com/FavLinks.inc"-->
        > Earl
        >>
        >
        I don't know if you can include external files from other websites.
        >
        Steve
        No you can't, which is what McKirahan almost said. The path must be a
        relative one to the current or virtual directory. Not a URL.

        --
        Mike Brind


        Comment

        • Earl Partridge

          #5
          Re: Include Files

          I've done the INCLUDE VIRTUAL for referring to another FOLDER on the
          same web site, but I want to include a file fron another web site.
          Earl


          "McKirahan" <News@McKirahan .comwrote in message
          news:aKudnchkpL pugMvanZ2dnUVZ_ ramnZ2d@comcast .com...
          >"Earl Partridge" <earlpNG@pearne t.comwrote in message
          >news:OEahP0tNI HA.4712@TK2MSFT NGP04.phx.gbl.. .
          >FP 2000
          >I have a single Include file that I want to use on multiple sites. I'm
          >trying to use the following (or some variation) but can't make it work.
          >>
          ><!--#INCLUDE FILE="www.myoth ersite.com/FavLinks.inc"-->
          >
          The following is from:
          <URL:http://www.hardcoder.c om/scripting/php/include_files.p hp>
          >
          How to Use Include Files in ASP
          >
          There are two ways to include files in ASP. With the "include file"
          or "include virtual" options. "Include virtual" tells ASP where the
          include file is relative to the web root directory, "include file" tells
          ASP where the file is relative to the current directory. Use either
          of the following tags to include files in ASP:
          >
          <!-- #include virtual="/includes/header.asp" -->
          (tells ASP where the file is located relative to the root web directory)
          >
          <!-- #include file="../includes/header.asp" -->
          (tells ASP where the file is relative to its current directory)
          >
          >

          Comment

          • Dave Anderson

            #6
            Re: Include Files

            "Earl Partridge" wrote:
            I've done the INCLUDE VIRTUAL for referring to another FOLDER on
            the same web site, but I want to include a file fron another web
            site.
            Another site or another server?

            We have about 30 web sites on one of our servers, and each has access to the
            same virtual "include" folder structure. Is that what you mean?



            --
            Dave Anderson

            Unsolicited commercial email will be read at a cost of $500 per message. Use
            of this email address implies consent to these terms.

            Comment

            • Earl Partridge

              #7
              Re: Include Files

              Since I have my sites hosted by another company, I suppose they could be
              on different servers. Guess I'd have to find out from my hosting service.
              Do you include the "URL"? Mike Brind just replied and said URL could not
              be used...
              Earl

              "Dave Anderson" <NPQRWPDWZGSP@s pammotel.comwro te in message
              news:13ldc9ebgm vesfc@corp.supe rnews.com...
              "Earl Partridge" wrote:
              >I've done the INCLUDE VIRTUAL for referring to another FOLDER on
              >the same web site, but I want to include a file fron another web
              >site.
              >
              Another site or another server?
              >
              We have about 30 web sites on one of our servers, and each has access to
              the same virtual "include" folder structure. Is that what you mean?
              >
              >
              >
              --
              Dave Anderson
              >
              Unsolicited commercial email will be read at a cost of $500 per message.
              Use of this email address implies consent to these terms.

              Comment

              • Dooza

                #8
                Re: Include Files

                Mike Brind wrote:
                "Dooza" <steveNO@SPAM.d ooza.tvwrote in message
                news:uVzHXkyNIH A.484@TK2MSFTNG P06.phx.gbl...
                >Earl Partridge wrote:
                >>FP 2000
                >>I have a single Include file that I want to use on multiple sites.
                I'm
                >>trying to use the
                >>following (or some variation) but can't make it work.
                >> <!--#INCLUDE FILE="www.myoth ersite.com/FavLinks.inc"-->
                >> Earl
                >>>
                >I don't know if you can include external files from other websites.
                >>
                >Steve
                >
                No you can't, which is what McKirahan almost said. The path must be a
                relative one to the current or virtual directory. Not a URL.
                Thats what I thought but my quick Google came up with nothing concrete.
                In a way I am glad it can't, otherwise content could be stolen all the time.

                Steve

                Comment

                • Mike Brind

                  #9
                  Re: Include Files


                  "Dooza" <steveNO@SPAM.d ooza.tvwrote in message
                  news:OzA9DR1NIH A.5400@TK2MSFTN GP04.phx.gbl...
                  Mike Brind wrote:
                  "Dooza" <steveNO@SPAM.d ooza.tvwrote in message
                  news:uVzHXkyNIH A.484@TK2MSFTNG P06.phx.gbl...
                  Earl Partridge wrote:
                  >FP 2000
                  >I have a single Include file that I want to use on multiple sites.
                  I'm
                  >trying to use the
                  >following (or some variation) but can't make it work.
                  > <!--#INCLUDE FILE="www.myoth ersite.com/FavLinks.inc"-->
                  > Earl
                  >>
                  I don't know if you can include external files from other websites.
                  >
                  Steve
                  No you can't, which is what McKirahan almost said. The path must be a
                  relative one to the current or virtual directory. Not a URL.
                  >
                  Thats what I thought but my quick Google came up with nothing concrete. In
                  a way I am glad it can't, otherwise content could be stolen all the time.
                  >
                  Steve
                  It could still be stolen if you suffix your include files with a variety of
                  file extensions that IIS is happy to serve without passing through asp.dll.
                  ".inc" will be served up on IIS 5.x, but I believe from IIS 6 + this
                  behaviour was changed. Best thing to do is to make it an .asp file.




                  --
                  Mike Brind


                  Comment

                  • Dave Anderson

                    #10
                    Re: Include Files

                    Earl Partridge wrote:
                    Since I have my sites hosted by another company, I suppose they could
                    be on different servers. Guess I'd have to find out from my hosting
                    service. Do you include the "URL"? Mike Brind just replied and said
                    URL could not be used...
                    RTM: http://msdn2.microsoft.com/en-us/library/ms525940.aspx



                    --
                    Dave Anderson

                    Unsolicited commercial email will be read at a cost of $500 per message. Use
                    of this email address implies consent to these terms.


                    Comment

                    • Dave Anderson

                      #11
                      Re: Include Files

                      Dooza wrote:
                      >The path must be a relative one to the current or virtual
                      >directory. Not a URL.
                      >
                      Thats what I thought but my quick Google came up with nothing
                      concrete. In a way I am glad it can't, otherwise content could be stolen
                      all the time.
                      Are you suggesting content is *NOT* stolen all the time?



                      --
                      Dave Anderson

                      Unsolicited commercial email will be read at a cost of $500 per message. Use
                      of this email address implies consent to these terms.


                      Comment

                      • Dooza

                        #12
                        Re: Include Files

                        Mike Brind wrote:
                        It could still be stolen if you suffix your include files with a variety of
                        file extensions that IIS is happy to serve without passing through asp.dll.
                        ".inc" will be served up on IIS 5.x, but I believe from IIS 6 + this
                        behaviour was changed. Best thing to do is to make it an .asp file.
                        >
                        http://classicasp.aspfaq.com/general...ude-files.html
                        One suggestion that I have heard is to use .inc.asp as this helps you as
                        a programmer to identify the file as an include. Any thoughts about this?

                        Steve

                        Comment

                        • Dooza

                          #13
                          Re: Include Files

                          Dave Anderson wrote:
                          Dooza wrote:
                          >>The path must be a relative one to the current or virtual
                          >>directory. Not a URL.
                          >Thats what I thought but my quick Google came up with nothing
                          >concrete. In a way I am glad it can't, otherwise content could be stolen
                          >all the time.
                          >
                          Are you suggesting content is *NOT* stolen all the time?
                          No, that would be naive of me to think that, but I can see why my reply
                          looks like that.

                          Steve

                          Comment

                          • Mike Brind

                            #14
                            Re: Include Files


                            "Dooza" <steveNO@SPAM.d ooza.tvwrote in message
                            news:eFuxLd%23N IHA.4656@TK2MSF TNGP03.phx.gbl. ..
                            Mike Brind wrote:
                            >It could still be stolen if you suffix your include files with a variety
                            >of file extensions that IIS is happy to serve without passing through
                            >asp.dll. ".inc" will be served up on IIS 5.x, but I believe from IIS 6 +
                            >this behaviour was changed. Best thing to do is to make it an .asp file.
                            >>
                            >http://classicasp.aspfaq.com/general...ude-files.html
                            >
                            One suggestion that I have heard is to use .inc.asp as this helps you as a
                            programmer to identify the file as an include. Any thoughts about this?
                            >
                            Steve
                            If that helps you, then why not? Mine are identified by the fact that they
                            all sit in a directory called inc, include or includes or similar.

                            --
                            Mike Brind


                            Comment

                            • Dooza

                              #15
                              Re: Include Files

                              Mike Brind wrote:
                              "Dooza" <steveNO@SPAM.d ooza.tvwrote in message
                              news:eFuxLd%23N IHA.4656@TK2MSF TNGP03.phx.gbl. ..
                              >Mike Brind wrote:
                              >>It could still be stolen if you suffix your include files with a
                              variety
                              >>of file extensions that IIS is happy to serve without passing through
                              >>asp.dll. ".inc" will be served up on IIS 5.x, but I believe from
                              IIS 6 +
                              >>this behaviour was changed. Best thing to do is to make it an .asp
                              file.
                              >>>
                              >>>
                              http://classicasp.aspfaq.com/general...ude-files.html
                              >One suggestion that I have heard is to use .inc.asp as this helps
                              you as a
                              >programmer to identify the file as an include. Any thoughts about this?
                              >>
                              >Steve
                              >
                              If that helps you, then why not? Mine are identified by the fact
                              that they
                              all sit in a directory called inc, include or includes or similar.
                              Yes, mine are always in a directory called includes.

                              The suggestion was given to a poster in the Dreamweaver forums, as the
                              were naming it .inc and Dreamweaver wasn't displaying the code
                              correctly, naming it .inc.php was the solution to get Dreamweaver to
                              read the code so that code hints and colouring worked. Seems like PHP is
                              still vulnerable to .inc files being read and not processed.

                              Steve

                              Comment

                              Working...