1 2 3 4 5 6 7 8 9 10 | <pre><code><?php $timedays = strtotime ( date ( "Y-m-d" ,time())); //今天0点的时间点 $timedaye = $timedays +3600*24; //今天24点的时间点,两个值之间即为今天一天内的数据 $xinxi_sql = $empire ->query( 'select id,title,titleurl from ' . $dbtbpre . 'ecms_news where newstime>=' . $timedays . ' and newstime<=' . $timedaye . ' order by newstime desc limit 10' ); while ( $xinxi_row = $empire ->fetch( $xinxi_sql )){ ?> <li><a rel= "nofollow noopener noreferrer" href= "<?=$xinxi_row[titleurl]?>" ><?= $xinxi_row [title]?></a></li> <? } ?></code></pre> |
以上就是帝国CMS模板调用:只读取当天发布的信息。时光,浓淡相宜;人心,远近相安。这就是最好的生活。更多关于帝国CMS模板调用:只读取当天发布的信息请关注haodaima.com其它相关文章!