For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > November 2007 > Include Pages and PHP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Include Pages and PHP
sales@freeweekends.co.uk

2007-11-29, 7:03 pm

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

2007-11-29, 7:03 pm

On Nov 29, 3:00 pm, sa...@freewends.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" --
>
>
> 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.
Lars Eighner

2007-11-29, 7:03 pm

In our last episode,
<ecf187cd-dc32-4c6e-9286-a2e45ae8e292@g30g2000hsb.googlegroups.com>, the
lovely and talented sales@freewends.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" --
[color=darkred]
> 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@larseighner.com
Countdown: 417 days to go.
Jerry Stuckle

2007-11-29, 10:01 pm

sales@freewends.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)

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@attglobal.net
==================

NC

2007-11-30, 4:02 am

On Nov 29, 12:00 pm, sa...@freewends.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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com