Home >Backend Development >PHP Tutorial >How to dynamically generate copyright information in php, dynamically generate copyright information in php_PHP tutorial

How to dynamically generate copyright information in php, dynamically generate copyright information in php_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:01:03864browse

How to dynamically generate copyright information in php, how to dynamically generate copyright information in php

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:

&copy; Copyright 2012 - 2015 jb51.net

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/972643.htmlTechArticleHow to dynamically generate copyright information in php, php dynamically generates copyright information. This article describes the example of php dynamically generating copyright information. method. Share it with everyone for your reference. Specific implementation...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn