Today, the ‘modified date’ on the main page was 4/27/2010. I edited the content of that page, but the date did not change.
I edited the php file that called the content, and the date still did not change.
Conclusion: the modified date of the included footer file is what is being displayed.
Used a variable to identify the content file. Used the variable to include the file. Tried to also pass the variable to the footer file to determine filemtime of the variable file. No luck. Have reason to believe that I should not be using the absolute path when including the footer file. After changing to the a relative path, I got the variable to echo in the footer. Before moving forward, however, the index page I was testing started to display blank. I had to restore backup files to get it to work. But I think this is the right track.
Update: Set up a testindex.php and a footer.htm.
In testindex.php, use a variable to name the content file to include. Then also use the variable to identify the file you want the modified date for. Both of the following must be true:
- The file name assigned to the variable must be a relative path. ‘content/index.htm’ works. ‘http://www.glenpritchard.com/content/index.htm’ does not work.
- The include statement to call the footer must also be a relative path. ‘/ssi/testFooter.php’ works. ‘http://www.glenpritchard.com/ssi/Footer.php does not work.
Verified that filemtime() will not work with a file referenced with an http: address.
Update: updated all pages with new variable includes. Last Updated in footer now working as intended.