Automatic Copyright Year PHP ASP .Net and JavaScript

Latest Tweet: "

To get your website to automatically  update your copyright year simple use one of the following:
Copyright year in PHP
&copy; <?php echo date(“Y”) ?>

Copyright year in Classic ASP
<% response.write (“&copy;” & Year(Now)) %>

Copyright year in .NET
<%=”&copy;” & DateTime.Now.Year %>

Copyright year in JavaScript
<SCRIPT LANGUAGE=”JavaScript”>
today=new Date();
cy=today.getFullYear();
document.write(‘&copy;’ + cy);
</SCRIPT>

If you have used any of the above code please comment below…

Leave a Reply