Jump to content

Introducting a sitewide footer.


whelpton

Recommended Posts

Hi everyone, Ive been looking for a way of doing this for days now & I am completely stumped.

 

Essentially, I want to have a footer, which is a php page, placed onto every single webpage that I create, or my users create on my site. I was looking for a way to do it with htaccess (http://www.trap17.com/index.php/Mod_rewrite-Htaccess_t36213.html) but that solution dosnt seem to work. Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/183922-introducting-a-sitewide-footer/
Share on other sites

Put this on the page (or pages) where you want your footer to appear.

 

<?php include_once('/path/footer.php'); ?>

 

Then in your footer.php file place whatever code you want to use for your footer.

 

Even if its a user generated page (Well depending on how you enable them to generate the pages) it's the easiest solution.

there are a few mods for apache that can do this or you could simply use the auto_append_file directive within your php.ini. keep in mind though that most pages will already include the closing </body> and </html> tags, so you might need to workaround breaking pages.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.