php指定时间内显示内容,该如何处理

WBOY
Release: 2016-06-13 11:57:52
Original
1298 people have browsed it

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

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

------解决方案--------------------
<br />if('20'.date('y/n/d',time())=='2014/5/21'){<br />    echo '你好';    <br />}else{<br />    echo '已过期';<br />}<br /><br />
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