Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Dream weaving calls the method of publishing articles in a certain period of time.

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Dream weaving calls the method of publishing articles in a certain period of time? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

How does dream weaving invoke articles published in a certain period of time?

Dream weaving DEDECMS calls articles published in a certain period of time.

Recommended study: dream weaving cms

/ / time limit (used to call recent popular articles, comments, etc.). The time here can only be counted to days, otherwise the cache function will be invalid.

/ / articles within 1 day when subday=1 is called

/ / call yesterday's article when subday=2

/ / when calling subday=3, get all the articles 2 days before

/ / get all articles within 7 days when subday=7 is called

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 ";} Thank you for reading! after reading the above, do you have a general idea of how to weave a dream and call a certain period of time to publish an article? I hope the content of the article will be helpful to all of you. If you want to know more about the article, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report