HTML common pill file |
HTML common pill file |
scott449 |
Jul 5 2020, 12:10 PM
Post
#1
|
Group: Members Posts: 3 Joined: 30-June 20 Member No.: 27,415 |
I have several web sites
They all have a common footer Is there way to have a common “footer file” then insert some HTML code into all my pages that pills the “footer file” in the footer section of each page. Huge pain in the ass to update all my footers this would alos be usefull for other parts of my sites that have common information that is updated regulary TIA |
Christian J |
Jul 6 2020, 06:36 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,659 Joined: 10-August 06 Member No.: 7 |
I have several web sites They all have a common footer You mean on separate domains, or just different pages on the same domain? QUOTE Is there way to have a common “footer file” then insert some HTML code into all my pages that pills the “footer file” in the footer section of each page. On a single website it's easy, for example here's all the PHP code needed to include the contents of the text file footer.txt: CODE <?php include 'footer.txt'; ?> You may also need to give the HTML files a .php extension instead of .html, though that can be changed. If you want to include a file from another domain, your server's PHP module must be configured to allow that in https://www.php.net/manual/en/filesystem.co...low-url-include this might be up to your webhost support, not sure. See also https://www.php.net/manual/en/function.include.php |
Lo-Fi Version | Time is now: 26th April 2024 - 05:44 PM |