Re: [PHP] last modified on a page
At 4:41 PM -0400 6/29/10, Paul M Foster wrote: On Tue, Jun 29, 2010 at 03:44:37PM -0400, tedd wrote: At 12:11 AM -0400 6/14/10, David Mehler wrote: Hello, I've got what is probably a simple question. I've got a site with a footer include file. I want to have a section that displays the last time the page was modified. So for example say the index.php was last modified today and another page was modified two days ago. When the include is run on the other page it says something like this page was last modified and it would be two days ago, but for the index file I get this page was last modified and today's date. Thanks. Dave. Dave: A bit late but try this: Wha--? I never heard of that function before (getlastmod)! Kewl. Paul Paul: Our knowledge is a bit like Swiss cheese, some parts are there and some parts are missing. :-) I have the distinct impression that my missing parts are getting larger. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] last modified on a page
On Tue, Jun 29, 2010 at 03:44:37PM -0400, tedd wrote: > At 12:11 AM -0400 6/14/10, David Mehler wrote: >> Hello, >> I've got what is probably a simple question. I've got a site with a >> footer include file. I want to have a section that displays the last >> time the page was modified. So for example say the index.php was last >> modified today and another page was modified two days ago. When the >> include is run on the other page it says something like this page was >> last modified and it would be two days ago, but for the index file I >> get this page was last modified and today's date. >> Thanks. >> Dave. > > Dave: > > A bit late but try this: > > echo "Last modified: " . date ("F d Y H:i:s.", getlastmod()); > ?> Wha--? I never heard of that function before (getlastmod)! Kewl. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] last modified on a page
At 12:11 AM -0400 6/14/10, David Mehler wrote: Hello, I've got what is probably a simple question. I've got a site with a footer include file. I want to have a section that displays the last time the page was modified. So for example say the index.php was last modified today and another page was modified two days ago. When the include is run on the other page it says something like this page was last modified and it would be two days ago, but for the index file I get this page was last modified and today's date. Thanks. Dave. Dave: A bit late but try this: Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] last modified on a page
On 14/06/2010, at 4:11 PM, David Mehler wrote: > Hello, > I've got what is probably a simple question. I've got a site with a > footer include file. I want to have a section that displays the last > time the page was modified. So for example say the index.php was last > modified today and another page was modified two days ago. When the > include is run on the other page it says something like this page was > last modified and it would be two days ago, but for the index file I > get this page was last modified and today's date. > Thanks. > Dave. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Try using filemtime() and $_SERVER['SCRIPT_FILENAME'] --- Simon Welsh Admin of http://simon.geek.nz/ Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php