Home > Backend Development > PHP Tutorial > php指定时间内显示内容

php指定时间内显示内容

WBOY
Release: 2016-06-23 13:56:46
Original
1174 people have browsed it

求一段可以在指定时间例如:在2014/5/21显示“您好!”代码,超过时间则显示“已过期!”。


回复讨论(解决方案)

echo date('Y/n/d') == '2014/5/21' ? '您好!' : '已过期!';
Copy after login

if('20'.date('y/n/d',time())=='2014/5/21'){    echo '你好';    }else{    echo '已过期';}
Copy after login

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