0){if($subday==1){$ntime =gmmktime(0,0,0,gmdate('m')}}"."> How does DreamWeaver call articles published in a certain time period?-DEDECMS-php.cn
Home> CMS Tutorial> DEDECMS> body text

How does DreamWeaver call articles published in a certain time period?

藏色散人
Release: 2020-01-06 09:08:00
Original
2050 people have browsed it

How does DreamWeaver call articles published in a certain time period?

How does Dreamweaver call articles published in a certain time period?

Dreamweaver DEDECMS calls a certain time period Published articles

Recommended learning:梦Weavercms

//Time limit (used to call recent popular articles, popular comments, etc.), the time here can only Calculate to day, otherwise the cache function will be invalid
//When subday=1, call the article within 1 day
//When subday=2, call yesterday’s article
//When subday=3 When calling all articles from 2 days ago
//When subday=7, calling all articles within 7 days

if($subday > 0) { if($subday == 1) { $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $orwheres[] = " arc.senddate > $limitday "; } else if ($subday == 2) { $ntime = gmmktime(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 = gmmktime(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 = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); $limitday = $ntime - ($subday * 24 * 3600); $orwheres[] = " arc.senddate > $limitday "; } } }
Copy after login

The above is the detailed content of How does DreamWeaver call articles published in a certain time period?. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!