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
Release: 2016-07-13 10:01:03
Original
868 people have browsed it

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}";
}
Copy after login

Demo example:

If the current year is 2013, use

copyright('2012', 'jb51.net');
Copy after login

will output:

&copy; Copyright 2012 - 2015 jb51.net
Copy after login

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...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template