Include Pages and PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sales@freeweekends.co.uk

    Include Pages and PHP

    I have used Include pages for a menu bar within a webpage - See below.

    <!--webbot bot="Include" U-Include="menu-categories.htm" TAG="BODY" --
    (Created by Frontpage)
    It works fine when the page is htm format, but when I use the page in
    php format, all the menus that are an Included link do not show.

    Any ideas???

    Thanks

    Alec
  • ZeldorBlat

    #2
    Re: Include Pages and PHP

    On Nov 29, 3:00 pm, sa...@freeweeke nds.co.uk wrote:
    I have used Include pages for a menu bar within a webpage - See below.
    >
    <!--webbot bot="Include" U-Include="menu-categories.htm" TAG="BODY" --
    >
    (Created by Frontpage)
    >
    It works fine when the page is htm format, but when I use the page in
    php format, all the menus that are an Included link do not show.
    >
    Any ideas???
    >
    Thanks
    >
    Alec
    It's tough to say since you haven't included any code. Post it here
    and we'll take a look.

    Comment

    • Lars Eighner

      #3
      Re: Include Pages and PHP

      In our last episode,
      <ecf187cd-dc32-4c6e-9286-a2e45ae8e292@g3 0g2000hsb.googl egroups.com>, the
      lovely and talented sales@freeweeke nds.co.uk broadcast on comp.lang.php:
      I have used Include pages for a menu bar within a webpage - See below.
      ><!--webbot bot="Include" U-Include="menu-categories.htm" TAG="BODY" --
      >(Created by Frontpage)
      It works fine when the page is htm format, but when I use the page in
      php format, all the menus that are an Included link do not show.
      Any ideas???
      Thanks
      Why in the world would you think a server would pre-process a page twice?
      Use PHP to do the include --- do not expect the server to parse the page
      again. You have not supplied enough details to make it possible to say
      exactly how this goes wrong in your particular configuration, but your
      theory is fundamently flawed and will go wrong, albeit in perhaps slightly
      different ways, in any configuration.


      --
      Lars Eighner <http://larseighner.com/usenet@larseigh ner.com
      Countdown: 417 days to go.

      Comment

      • Jerry Stuckle

        #4
        Re: Include Pages and PHP

        sales@freeweeke nds.co.uk wrote:
        I have used Include pages for a menu bar within a webpage - See below.
        >
        <!--webbot bot="Include" U-Include="menu-categories.htm" TAG="BODY" --
        >(Created by Frontpage)
        >
        (Created by FrontPage)

        First mistake.
        It works fine when the page is htm format, but when I use the page in
        php format, all the menus that are an Included link do not show.
        >
        Expecting FrontPage to understand PHP - second mistake.
        Any ideas???
        >
        Thanks
        >
        Alec
        >
        1. Learn basic HTML and get rid of your garbage generator.
        2. Use PHP includes to include the files.

        FrontPage include statements are in .htm(l) files and processed by the
        FrontPage extensions. PHP statements are in .php files and are
        processed by the PHP interpreter.

        Ne'er the twain shall meet.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • NC

          #5
          Re: Include Pages and PHP

          On Nov 29, 12:00 pm, sa...@freeweeke nds.co.uk wrote:
          >
          I have used Include pages for a menu bar within a webpage - See below.
          >
          <!--webbot bot="Include" U-Include="menu-categories.htm" TAG="BODY" -->
          >
          (Created by Frontpage)
          >
          It works fine when the page is htm format, but when I use the page in
          php format, all the menus that are an Included link do not show.
          >
          Any ideas???
          As a short-term fix, replace this:

          <!--webbot bot="Include" U-Include="menu-categories.htm" TAG="BODY" --
          >
          with this:

          <?php readfile('menu-categories.htm' ); ?>

          As a long-term strategy, do not use Frontpage past HTML template
          development; once you have a HTML / CSS / JavaScript template,
          continue to develop with something better suited for PHP.

          Cheers,
          NC

          Comment

          Working...