日期:2014-05-17  浏览次数:20569 次

PHP求一个IF语句。谢谢。
如果服务器的时间是 半夜11点到第二天6点的话

显示这个<a herf=http://www.baidu.com>百度</a>|<a herf=http://www.soso.com>soso</a>

否则显示<a herf=http://www.baidu.com rel=nofollow>百度</a>|<a herf=http://www.soso.com rel=nofollow>soso</a>

------解决方案--------------------
if(date('H')>=23 || date('H')<=6) {
?>
<a herf=http://www.baidu.com>百度</a>|<a herf=http://www.soso.com>soso</a>
<?php
}else {
?>
<a herf=http://www.baidu.com rel=nofollow>百度</a>|<a herf=http://www.soso.com rel=nofollow>soso</a>

------解决方案--------------------
探讨

if(date('H')>=23 || date('H')<=6) {
?>
<a herf=http://www.baidu.com>百度</a>|<a herf=http://www.soso.com>soso</a>
<?php
}else {
?>
<a herf=http://www.baidu.com rel=nofollow>百度</a>|<a herf=http://……