Get the App
SLTechnology News&Howtos  ›  Development  › 

How to generate copyright Information dynamically by php

Shulou Source: shulou.com Published: 2022-06-03 19:46:24 10月05日 Update

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!

Tags: Information dynamic copyright copyright generation content more article good practical year article method look knowledge example reference help related presentation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux OPPO Reno NVidia Apple