If you work on many websites it doesn’t take long before you realize how many of them have out of date copyright dates in the footer. Back in the good old days when sites were hand-coded and php was seldom used, copyright dates were hard-coded along with just about everything else.
It’s so easy to fix that problem and I”m going to show you how simple it is. You don’t need to know anything about php either. All you have to do is drop this little piece of php code into your footer and it will take care of the annual updating of the year for you. No more batch search and replace operations to replace 82 pages of out of date copyright years. Yay!
So let’s say your current footer looks something like this…
<p id="footer">copyright © 1998 by My Big Old Company, Inc</p>
To put that copyright year on auto-pilot, simply drop this bit of code in there and sit back and relax.
<p id="footer">copyright © <?php echo date('Y'); ?> by My Big Old Company Inc</p>
If your copyright is a range of years, like 2001-2011, just add the snippet after the dash of the first year like this…
<p id="footer">copyright © 2001-<?php echo date('Y'); ?> by My Big Old Company, Inc</p>
I don’t know much about PHP but I do know how to add that little bit of code and it takes away a big nuisance that used to occur every year. You can learn more about PHP and the date function by visiting PHP.net
I’ve got a 2G iPod Touch. It’s 22 months old. I had been running OS3 on it ever since OS3 was released and my battery life has been quite good. I’d be able to go several days before needing a charge. That all changed immediately following my updating to iOS 4. I was shocked at how quickly my battery lost its charge. I’d notice in the evening that I had 75% charge and in the morning it would be almost nothing. I never completely shut down my iPod but let it sleep instead. I also noticed that startup time took nearly 35 seconds where in OS3 it was more like 15 seconds to startup.



























Recent Comments