织梦若何挪用某个工夫段公布的文章?
织梦DEDECMS挪用某个工夫段公布的文章
保举学习:织梦cms
//工夫限度(用于挪用比来抢手文章、抢手评论之类),这里的工夫只能较量争论到天,不然缓存性能将有效
//当subday=1的时分挪用1天内的文章
//当subday=2的时分挪用昨天的文章
//当subday=3的时分挪用2天前患上一切文章
//当subday=7的时分挪用7天内患上一切文章
if($subday > 0) { if($subday == 1) { $ntime = g妹妹ktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $orwheres[] = " arc.senddate > $limitday "; } else if ($subday == 2) { $ntime = g妹妹ktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $lomitday = $ntime; $orwheres[] = " arc.senddate > $lomitday && arc.senddate < $limitday"; } else if ($subday == 3) { $ntime = g妹妹ktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime -($subday * 24 * 3600)+(1*24 * 3600); $orwheres[] = " arc.senddate < $limitday "; } else if ($subday == 7) { $ntime = g妹妹ktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $orwheres[] = " arc.senddate > $limitday "; } } }
标签: 织梦教程 织梦技巧 dedecms教程 dede问题解决 织梦
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。