Loading ...
Sorry, an error occurred while loading the content.

RE: [NH] Need help with path for PHP incude

Expand Messages
  • John Shotsky
    I ve never tried that, but if not supported, I would break the master include into two parts, then call the first one, then the sub include, then the second
    Message 1 of 25 , Jul 28, 2012
    • 0 Attachment
      I've never tried that, but if not supported, I would break the master include into two parts, then call the first one,
      then the 'sub' include, then the second part of the master include.

      Regards,
      John
      RecipeTools Web Site: http://recipetools.gotdns.com/


      -----Original Message-----
      From: ntb-html@yahoogroups.com [mailto:ntb-html@yahoogroups.com] On Behalf Of Mike Breiding - Morgantown WV
      Sent: Saturday, July 28, 2012 10:05
      To: ntb-html@yahoogroups.com
      Cc: Rudolf Horbas
      Subject: Re: [NH] Need help with path for PHP incude

      I'm back again with the same need but a different situation.

      I want to use an include within and include.

      I would like to use a master menu as an include for each of my pages.
      The master is here:
      http://epicroadtrips.us/master_menu.php

      I want to use the master include in this include:
      <div id="navwrapper">
      <div id="navigation">
      <?php include("w1navigation.php"); ?>
      </div>
      </div>

      This would be the file w1navigation.php with the "master_menu.php" include.
      I am hoping for this result for each page menu:
      http://epicroadtrips.us/2012/escape/
      The above link uses a copy and paste to include the master menu.


      ~~~~~~~~w1navigation.php~~~~~~~~~
      <h4>Mike Breiding's Epic Road Trips<br /> Spain: 10 Days in Segovia</h4>

      <ul>
      <li class="week">Week 1</li>
      <li<?php if ($thisPage=="day1-03september2010") echo "
      id=\"currentpage\""; ?>><a href='http://epicroadtrips.us/2010/spain/d1/'
      title="Day 1: My First Flight East - Pittsburgh, DC, Madrid,
      Segovia">Day 1: My First Flight East - Pittsburgh, DC, Madrid,
      Segovia</a></li>

      <?php include("master_menu.php"); ?>

      li style="font-size: 100%; margin-left: 15px; margin-top:
      15px"><strong><a href="http://EpicRoadTrips.us" target="_blank"
      title="Mike Breiding's Epic Road Trips">
      ERT - HOME</a></strong></li>
      </ul>

      <div id="dedication">
      <p><a href='http://EpicRoadTrips.us/dad' target="_blank" title=" My
      dad's web site ">This site is dedicated to my father:<br />
      <strong style="font-size:105%">George H. Breiding</strong><br />
      Read more...</a></p>
      ~~~~~~~~~~~~~~~~~

      The question is the same as before.
      How to direct each current page menu to the same master_menu.php file so
      it is added to the current page menu.

      I am not sure this is clear or not.

      Thanks,
      -Mike




      On 3/6/2012 6:49 PM, Rudolf Horbas wrote:
      > Mick Housel wrote:
      >
      >> include("http://epicroadtrips.us/2011/mtown2gv_nov_2011_p1/w1navigation.php");
      >> (long line above)
      >>
      >> You can't get any more straightforward than completely defining the
      >> path, my preference.
      >
      > Yes, you can. Not only will this fail in certain configs
      > (allow_url_fopen, allow_url_include): There's no point using a slow http
      > request via the network when the file is on the same disk.
      > Use an absolute path instead, and prepend it with the server var
      > DOCUMENT_ROOT:
      >
      > <?php
      > include $_SERVER['DOCUMENT_ROOT'] .
      > '/2011/mtown2gv_nov_2011_p1/w1navigation.php';
      > ?>
      >
      > Rudi
      >
      >
      > ------------------------------------
      >
      > Fookes Software: http://www.fookes.com/
      > NoteTab website: http://www.notetab.com/
      > NoteTab Discussion Lists: http://www.notetab.com/groups.php
      >
      > ***
      > Yahoo! Groups Links
      >
      >
      >
      >
      >


      ------------------------------------

      Fookes Software: http://www.fookes.com/
      NoteTab website: http://www.notetab.com/
      NoteTab Discussion Lists: http://www.notetab.com/groups.php

      ***
      Yahoo! Groups Links
    • Mike Breiding - Morgantown WV
      ... Hi John, My main brain twister is how to point all the pages to one include file. In other words - figuring out the path to use for each one. If the
      Message 2 of 25 , Jul 28, 2012
      • 0 Attachment
        On 7/28/2012 1:21 PM, John Shotsky wrote:
        > I've never tried that, but if not supported, I would break the master include into two parts, then call the first one,
        > then the 'sub' include, then the second part of the master include. Regards, John

        Hi John,
        My main brain twister is how to point all the pages to one include file.
        In other words - figuring out the path to use for each one.

        If the include within an include is not supported I think I can work
        with that. But the path question is my concern.

        Thanks,
        -Mike
      • Axel Berger
        ... Not sure if I ve got it, but could you write is as an absolute path beginning with a slash / to make it work from everywhere? Axel
        Message 3 of 25 , Jul 28, 2012
        • 0 Attachment
          Mike Breiding - Morgantown WV wrote:
          > But the path question is my concern.

          Not sure if I've got it, but could you write is as an absolute path
          beginning with a slash "/" to make it work from everywhere?

          Axel
        • Mike Breiding - Morgantown WV
          ... I will see what I can do with that. Thanks, -Mike
          Message 4 of 25 , Jul 29, 2012
          • 0 Attachment
            On 7/28/2012 7:22 PM, Axel Berger wrote:
            > Mike Breiding - Morgantown WV wrote:
            >> But the path question is my concern.
            >
            > Not sure if I've got it, but could you write is as an absolute path
            > beginning with a slash "/" to make it work from everywhere?

            I will see what I can do with that.
            Thanks,
            -Mike


            >
            > Axel
            >
            >
            > ------------------------------------
            >
            > Fookes Software: http://www.fookes.com/
            > NoteTab website: http://www.notetab.com/
            > NoteTab Discussion Lists: http://www.notetab.com/groups.php
            >
            > ***
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
          • rhorbas@gmx.net
            the following is failsafe: $_SERVER[ DOCUMENT_ROOT ] . /path/to/your/include.php Rudi
            Message 5 of 25 , Jul 30, 2012
            • 0 Attachment
              the following is failsafe:

              $_SERVER['DOCUMENT_ROOT'] . '/path/to/your/include.php'

              Rudi

              Mike Breiding - Morgantown WV schrieb am 29.07.2012 14:58:
              > On 7/28/2012 7:22 PM, Axel Berger wrote:
              >> Mike Breiding - Morgantown WV wrote:
              >>> But the path question is my concern.
              >>
              >> Not sure if I've got it, but could you write is as an absolute path
              >> beginning with a slash "/" to make it work from everywhere?
              >
              > I will see what I can do with that.
              > Thanks,
              > -Mike
              >
              >
              >>
              >> Axel
            • Mike Breiding - Morgantown WV
              ... Thanks. I will play with this. -Mike
              Message 6 of 25 , Jul 30, 2012
              • 0 Attachment
                On 7/30/2012 11:07 AM, rhorbas@... wrote:
                > the following is failsafe:
                >
                > $_SERVER['DOCUMENT_ROOT'] . '/path/to/your/include.php'


                Thanks.
                I will play with this.
                -Mike

                >
                > Rudi
                >
                > Mike Breiding - Morgantown WV schrieb am 29.07.2012 14:58:
                >> On 7/28/2012 7:22 PM, Axel Berger wrote:
                >>> Mike Breiding - Morgantown WV wrote:
                >>>> But the path question is my concern.
                >>>
                >>> Not sure if I've got it, but could you write is as an absolute path
                >>> beginning with a slash "/" to make it work from everywhere?
                >>
                >> I will see what I can do with that.
                >> Thanks,
                >> -Mike
                >>
                >>
                >>>
                >>> Axel
              Your message has been successfully submitted and would be delivered to recipients shortly.