i'm looking for a code that updates a website. instead of everytime i login to update something and change the thing to "updated 5/9/08" or something like that, is there a code i can insert that it just updates each day.so tomorrow it will say "updated 5/10/08" i was told that there it should auto update everytime i login, but it doesnt. just the certain page is "updated" and it doesnt even say it on that page.thanks
5/9/2008 12:08:06 PM
if you aren't really performing updates and just want the time stamp to say the current date just cheat and use php or javascript to output the current date.
5/9/2008 12:09:09 PM
in php, you would just put this in your page.
echo date('n/j/y');
5/9/2008 12:12:27 PM
well the thing is i have actually been updating it for the past like 3 weeks. and probably for the next 2-3 weeks to come.^,^^ sound like a good idea
5/9/2008 12:19:07 PM
i used something like this several years ago to display the ACTUAL last file update date/time. not sure if it's still a well accepted way to do it, but here ya gohttp://dionysia.org/software/lastupdated/ssi-method.html
5/9/2008 12:27:15 PM
5/9/2008 12:40:21 PM
^^i used to do that back in the day when i did web design... by far the easiest way to update the "updated last" date.
5/9/2008 12:41:49 PM
ok, kinda new here at this stuff.so all i type in is echo date('n/j/y');im using joomla BTW
5/9/2008 12:44:34 PM
well with a CMS it's a bit differentis it a field you change? or what?easiest way would be to edit the template your site uses and place something in the footerecho date('n/j/y'); will echo the current dateif it's not already inside php brackets, do the following: echo date('n/j/y'); ?>
5/9/2008 12:46:08 PM
nicethanks all
5/9/2008 12:54:53 PM
nice. anyway to do it like weekly, instead of every day. every day doesnt hurt. but weekly is more practicle
7/15/2008 7:56:07 AM
echo date('n/j/y', strtotime('last monday')); // outputs 7/14/08 as of this postsubstitute 'monday' for whatever day you want this to be updated on. i'm thinking this might break if it is the actual day of the 'update' so a cheap way to get around that would be:if (date('w') == 1){ echo date('n/j/y');} else{ echo date('n/j/y', strtotime('last monday'));}or you can do some shorthand:echo date('w') == 1 ? date('n/j/y') : date('n/j/y', strtotime('last monday'));
if (date('w') == 1){ echo date('n/j/y');} else{ echo date('n/j/y', strtotime('last monday'));}
echo date('w') == 1 ? date('n/j/y') : date('n/j/y', strtotime('last monday'));
7/15/2008 2:05:11 PM