迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
https://www.xunruicms.com/doc/710.html
这个文章内的附件id如何获取的,有没有上面办法直接显示文件大小和文件上传的时间
{module module=download catid=13 order=updatetime } {loop $t.fj $i $c} <a href="{dr_down_file($c.file)}" target="_blank" class="download-item sr_b"> {/loop} <div class="download-item-cell">{$t.title}</div> <div class="download-item-cell"> {loop $t.fj $i $c} {php $data = \Phpcmf\Service::C()->get_attachment($c.file);} {dr_format_file_size($data.filesize)} {/loop} </div> <div class="download-item-cell">{dr_date($t._inputtime, 'Y-m-d')}</div> <div class="download-item-cell"> <div class="download-img"> <img src="{HOME_THEME_PATH}images/download.svg" alt="" /> </div> <div class="download-img-act"> <img src="{HOME_THEME_PATH}images/download-active.svg" alt="" /> </div> </div> </a> {/module}
{module module=download catid=13 order=updatetime } {loop $t.fj $i $c} <a target="_blank" href="{dr_down_file($c.file)}" target="_blank" class="download-item sr_b"> {/loop} <div class="download-item-cell">{$t.title}</div> <div class="download-item-cell"> {loop $t.fj $i $c} {php $data = \Phpcmf\Service::C()->get_attachment($c.file);} {dr_format_file_size($data.filesize)} 时间 {dr_date($data.inputtime)} {/loop} </div> <div class="download-item-cell">{dr_date($t._inputtime, 'Y-m-d')}</div> <div class="download-item-cell"> <div class="download-img"> <img src="{HOME_THEME_PATH}images/download.svg" alt="" /> </div> <div class="download-img-act"> <img src="{HOME_THEME_PATH}images/download-active.svg" alt="" /> </div> </div> </a> {/module}