The website I design is all html, htm and shtml files. Recently I was asked to create a process whereby the website will utilize multiple footer files. These were initially called in via an SSI include statement but the number has grown and now want to manage it using PHP.
I created a php file that has a switch/case statement and selects the footer data based on an ID passed to it from the html file. Here’s the issue, when I run it from the URL line http://website.com/thescript.php?id=5 everything works perfectly. However, when I try to incorporate <? include("includes/thescript.php?id=5"); ?> into the HTML pages, it stops working.
I know it has something to do with the inability for the PHP to be read by the html, etc. So, I updated the .htaccess file…multiple times and a few different options. None of them work.
I also tried adding the PHP via an iframe and this did work but I lost all of my formatting, css, etc. I don’t know much about iframes so I backed out of that.
- Works from URL
- Works inside iframe
- Does not work from HTML
Anyone have any ideas what I could try next? I’ve spent many many hours trying different htaccess configurations. Keep in mind that I still use SSI (the html and htm act as shtml files) so I don’t want to lose that functionality.
I appreciate any input whatsoever! Thanks in advance!!