How PHP dynamically generates all copyright information
This article mainly introduces the PHP dynamic generation of all copyright information methods, examples of PHP time and string operation skills, with a certain reference value, the need for friends can refer to the next
This article explains how PHP dynamically generates all copyright information. Share to everyone for your reference. The implementation method is as follows:
?
1 2 3 4 5 6 7 8 |
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
?
1 |
Copyright (' A ', ' jb51.net '); |
Will output:
?
1 |
©copyright 2012-2015 jb51.net |
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/973108.html www.bkjia.com true http://www.bkjia.com/PHPjc/973108.html techarticle how PHP dynamically generates all copyright information This article mainly introduces the PHP dynamic generation of all copyright information methods, examples of PHP time and string operation skills, with a certain reference ...