'noindex', 'desc' => '...'] */ function fb_layout_head($title, array $opt = []) { $site = (string)fb_cfg('site_name'); $robots = isset($opt['robots']) ? (string)$opt['robots'] : 'index,follow'; $full = $title === '' ? $site : ($title . ' · ' . $site); ?> <?php echo e($full); ?>
全部问题 管理后台 我要反馈
' . e($msg) . ''; } /** * 渲染附件上传控件(图片 / 视频;上传经服务器中转落地,local/OSS 前端同一路径) * 需置于
内部:会输出一个 name="attachments" 的隐藏字段, * 由 assets/app.js 在文件上传成功后回填 JSON 描述。 * * @param array $existing 校验失败时已上传的附件描述(避免用户重复上传) */ function fb_uploaders(array $existing = []) { $kinds = []; if (fb_upload_kind_on('image')) { $kinds[] = 'image'; } if (fb_upload_kind_on('video')) { $kinds[] = 'video'; } if (!$kinds) { return; } $init = []; foreach ($existing as $it) { $kind = isset($it['kind']) ? (string)$it['kind'] : 'image'; $key = isset($it['key']) ? (string)$it['key'] : ''; if ($key === '') { continue; } $init[] = [ 'kind' => $kind, 'key' => $key, 'size' => isset($it['size']) ? (int)$it['size'] : 0, 'name' => isset($it['name']) ? (string)$it['name'] : '', 'mime' => isset($it['mime']) ? (string)$it['mime'] : '', 'w' => isset($it['width']) ? (int)$it['width'] : 0, 'h' => isset($it['height']) ? (int)$it['height'] : 0, 'url' => fb_attach_url($key), 'thumb' => $kind === 'image' ? fb_attach_thumb_url($key, 360) : '', ]; } ?>
tabindex="-1">