How do I use PHP to get the current year?

后端 未结 26 2239
萌比男神i
萌比男神i 2020-12-04 04:31

I want to put a copyright notice in the footer of a web site, but I think it\'s incredibly tacky for the year to be outdated.

How would I make the year update automat

26条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 05:21

    My way to show the copyright, That keeps on updating automatically

    Copyright ©

    It will output the results as

    copyright @ 2017   //if $copyYear is 2017 
    copyright @ 2017-201x    //if $copyYear is not equal to Current Year.
    

提交回复
热议问题