The example in this article describes the method of dynamically generating copyright information in php. Share it with everyone for your reference. The specific implementation method is 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
copyright('2012', 'jb51.net');
will output:
© Copyright 2012 - 2015 jb51.net
I hope this article will be helpful to everyone’s PHP programming design.