Click to See Complete Forum and Search --> : Auto Update....


MattchuB
12-13-2003, 04:27 PM
Is there something that I can do to make my "last updated on ______" update itself everytime I upload something to my server?? That would be really convenient, because I want to have a self-sufficient site once I stop working on it. Also, if I have a section where people can post news, can it update for those also??

pyro
12-13-2003, 04:51 PM
Try filemtime() (http://us2.php.net/function.filemtime) or getlastmod() (http://us2.php.net/manual/en/function.getlastmod.php).

MattchuB
12-13-2003, 04:55 PM
Where do I put those?

pyro
12-13-2003, 05:01 PM
Something like this, perhaps:

<?PHP
$last_mod = getlastmod();
echo "Last modified: ".date("l, F jS, Y");
?>

MattchuB
12-13-2003, 05:21 PM
K, this one works. Yay for that.

pyro
12-13-2003, 05:27 PM
Good deal. :)