Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    the Netherlands
    Posts
    215
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add footer to all .html in a dir

    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
    My Website
    010100010011110101110100011011110111000001101000

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    chr...
    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)))
    http://cgi.resourceindex.com/Program...s_and_Footers/
    Last edited by justame; 04-06-2003 at 06:11 PM.

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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:

    http://www.zend.com/zend/spotlight/prepend.php
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    the Netherlands
    Posts
    215
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks I'll give it a try
    My Website
    010100010011110101110100011011110111000001101000


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •