How to generate copyright Information dynamically by php
This article is about how php dynamically generates copyright information. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The specific implementation methods are as follows:
Function copyright ($start, $owner) {$date = date ('Y'); echo "©Copyright"; if ($start < $date) {echo "{$start} -";} echo "{$date} {$owner}";}
Demo example:
If the current year is 2013, use the
Copyright ('2012,' jb51.net')
Output:
©Copyright 2012-2015 jb51.net Thank you for your reading! This is the end of this article on "how to dynamically generate copyright information in php". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!