including content

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I got a website consisting of about 150 php pages.
The site uses a frameless table based design.
Header and menu are always the same and therefore should be extracted.
At the moment I got a "frame" (not a real html frame, more like  
"framework"), that contains my menu and header content.
In this php page I dynamically include all content pages.
Downsides: All pages got the same meta tags.
Now I am looking for a better solution. I considered to
do it "upside down" by including the menu and header content into
the content pages instead - this way each page could have their own meta  
tags. Problem: Depending on the directory depth, the path to the menu  
and header pages to includes always varies. Absolute paths don't seem to
work with the php include command.
What would you suggest me to do, and are there any automatical tools
that could easily do the job for me?

I've heard of a tool that creates "static" pages by "physically"  
including all contents into a page
The link to that tool was:

Unfortunatelly, the link is broken.

So in conlusion:

- What would you suggest me to do to get individual meta tags for each
page as fast and easy as possible?

- Do you maybe know a tool that could help here?



Re: including content

Martin Mücke wrote:
Quoted text here. Click to load it

My pages typically include headers and footers, then have the content in  
them.  I don't include another page of content.

Absolute paths work fine with the include command.  Just remember - they  
are absolute to the file system, not the web server.  If you want them  
to be web server absolute, you need to use:

   include ($_SERVER['DOCUMENT_ROOT'] . '/path/to/header.php')

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline