PHP
PHP Last Updated Script
Written by The Geekette on September 17, 2008 – 4:09 pmPosted in PHP | 2 Comments »
If you are using PHP and you would like a quick “Last Updated”line to be on the page, just place the following script in your html:
<?php date_default_timezone_set(”EST”); echo date (”Y-m-j h:i:s A (T)”, getlastmod()); ?>
The result will look like:
2008-09-11 07:37:23 PM (EST)
Or, if the command with the default time zone in it does not work, this one should do the same:
<?php echo date (”Y-m-j h:i:s A (T)”, getlastmod()); ?>
The result will look like:
2008-09-11 07:37:23 PM (EST)
Tags: last, PHP, script, updated

(32 votes, average: 4.5 out of 5)