View Full Version : Add footer to all .html in a dir

04-06-2003, 06:35 PM
Does anyone have an idea how I can add a footer to all the .html files in a specific dir.

In this dir I have I add .html files, not just one or two but like five a day. I want all the .html files to have a specifiec footer, lets say this:
<center><b>Thanks for viewing</b></center>
You can understand I don't quite feel like editing all these .html files I add to this dir so I'm looking for a ServerSide solution for this.

I'd prefer a solution that pastes this footer on request so I don't have edited .html files.

My server runs Win98 + Apache + PHP +MySQL + Perl + SSI

Thanks in advance
Mzzl, Chris

04-06-2003, 07:03 PM
isnt thattt just a called® ssi... n' your pages havvve to have the ol' .shtml extention???
n' youd still have to just a edit® eachhh page on your 'site' to have the ol' include statement...
aka on just a every® newww page from then on??? yad have to put...
#include ...or something like thattt...

keepin' ya company til the pros come just a long®...

just a ps®...
just a checkout® thisss page...:O)))

04-06-2003, 09:11 PM
Hi justayou. I don't think they want to have to edit each of their files.

I don't quite feel like editing all these .html files

There is a way to do this with PHP. It is called auto-prepending or auto-appending. Basically either through your apache configuration or through .htaccess you need to tell apache to parse your .html files as .php. Then in PHP you can automatically include a specified file in every page without having to actually edit the code in each page.

Here is a tutorial on how to do that:


04-06-2003, 09:45 PM
Thanks I'll give it a try