联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
文章内的附件id如何获取的
类型:迅睿CMS 更新时间:2020-11-24 11:33:39

{xunruicms_img_title}


https://www.xunruicms.com/doc/710.html


{xunruicms_img_title}

这个文章内的附件id如何获取的,有没有上面办法直接显示文件大小和文件上传的时间

回帖
  • 迅睿框架技术-实习
    #1楼    迅睿框架技术-实习
    2020-11-24 11:20:12
    Chrome 0
  • 万俟肸
    #2楼    万俟肸
    2020-11-24 11:22:35
    Chrome 0
    迅睿框架技术-实习 这个文档地址我已经贴在问题里了,我是问如何获取上传时间,id我拿到了
  • 迅睿框架技术-实习
    #3楼    迅睿框架技术-实习
    2020-11-24 11:24:05
    Chrome 0
    你把你的调用代码发来,我给你小改小改
  • 万俟肸
    #4楼    万俟肸
    2020-11-24 11:25:09
    Chrome 0
                   {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}
    迅睿框架技术-实习
  • 迅睿框架技术-实习
    #5楼    迅睿框架技术-实习
    2020-11-24 11:26:19
    Chrome 0
     {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}
    满意答案
  • 万俟肸
    #6楼    万俟肸
    2020-11-24 11:33:39
    Chrome 0
    @迅睿框架技术-实习:腰细~完美