Updating the copyright year on your website may not be a legal requirement, but it’s smart marketing. It tells the visitor the site is active. Showing the current year is especially important if you have a brochure site without dates on its content.
And here’s the php script:
Yes, the php script is simpler, but it may not work just yet. You first need to take another step to make the php script run on html pages. You need to create or edit a .htaccess file. This is not as onerous as it sounds. It’s actually a good thing, because then you’ll be able to run other php scripts on your site, which can be extremely useful.
Creating the.htaccess File
To set up a.htaccess file, open a new file in a text editor like Notepad or SimpleText.
Paste the following code into the file:
If you have an existing.htaccess file, open it and add the above code.
Alternatively, search your web host’s site for “How to parse php within html files.” Follow its instructions on what code to enter in the.htaccess file. (Your web host might specify an entirely different process for parsing php in html pages. Follow those directions instead of the ones here.)
After inserting the code, in Notepad click File > Save As…
Type .htaccess as the file name and from the Save as type dropdown menu, select All Files.
Click Save, then go back and make sure the editor didn’t add an extension to the filename after.htaccess. If you find an extension, delete it.
Upload the.htaccess file to the root directory of your website. This is the topmost folder of your website’s file structure and is usually named example.com or example.com/home.
The.htaccess file now affects every other file in your website.
Updating Your Blog’s Copyright
Copyright That Spans Several Years
A range of years next to your copyright symbol subtly reminds the visitor how long you’ve been in business or how long your website has been up. Use the script to update the last year of your range.
Copy and paste the following as your copyright notice’s html code. Change 2002 to the year in which your site was established:
Copyright © 2002–
Your copyright year updates are now on autopilot. One less thing to worry about at 12:00:01 a.m. next Jan. 1.