百度 | 神马 | 搜狗 | 技术文档 | 学习资料分享 - 记录帝国CMS及运维技术的点点滴滴
你的位置:首页 > 帝国cms技术 » 正文

帝国CMS模板调用:只阅读当天发布的信息

发布时间:2020-11-07

作品分类:帝国CMS  模板  当天  信息
<?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)){
  ?>
  
  • <?=$xinxi_row[title]?>
  • <? } ?>
    Top