php时间判断,该如何解决

WBOY
Release: 2016-06-13 11:57:59
Original
968 people have browsed it

php时间判断
想在某个时间段,例如:2014/5/21-2014/5/31显示“高级会员”日期超过2014/5/31则显示“会员已过期”,应该怎么做?
------解决方案--------------------

<br /><?php<br />if(time()>=strtotime('2014-5-21') && time()<=strtotime('2014-5-31')){<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