迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
情况是这样的,使用内容维护工具进行批量略缩图下载的时候,下载的附件没有归档,但是我在数据库中有看到附件表字段related有相对应的ID,也就是有归档信息,但是没有归档
插件教程:https://www.xunruicms.com/doc/app-782.html
// 附件归档 $att = \Phpcmf\Service::M('Attachment')->save_data($rt['data'], \Phpcmf\Service::M()->dbprefix($table).'-'.$row['id']); if ($att['code']) { $update[] = [ 'id' => (int)$row['id'], 'thumb' =>$att['code'] ]; }
// 附件归档 $att = \Phpcmf\Service::M('Attachment')->save_data($rt['data'], \Phpcmf\Service::M()->dbprefix($table).'-'.$row['id']); if ($att['code']) { $update[] = [ 'id' => (int)$row['id'], 'thumb' =>$att['code'] ]; } // 再次归档: Adai $related = \Phpcmf\Service::M()->dbprefix($table).'-'.$row['id']; $t = \Phpcmf\Service::M()->table('attachment_unused')->get($att['code']); if ($t) { // 更新主索引表 \Phpcmf\Service::M()->table('attachment')->update($att['code'], array( 'uid' => $t['uid'], 'author' => '', 'tableid' => 0, 'related' => $related )); \Phpcmf\Service::M()->table('attachment_data')->insert(array( 'id' => $t['id'], 'uid' => $t['uid'], 'remote' => $t['remote'], 'author' => '', 'related' => $related, 'fileext' => $t['fileext'], 'filesize' => $t['filesize'], 'filename' => $t['filename'], 'inputtime' => $t['inputtime'], 'attachment' => $t['attachment'], 'attachinfo' => $t['attachinfo'], )); // 删除未使用附件 \Phpcmf\Service::M()->table('attachment_unused')->delete($att['code']); }