NewHome/api/site.php

13 lines
589 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* api/site.php —— 站点公开元信息 JSON 接口
* 供纯静态 HTML 页(如 func/*.html读取当前站点 logo使工具页 favicon / 标识与后台设置保持同步。
* 返回:{ "logo": "data/logo/site_logo_xxx.svg" 或 ""(空 = 使用默认 assets/img/logo.svg }
*/
require_once dirname(__DIR__) . '/includes/db.php';
header('Content-Type: application/json; charset=utf-8');
header('Cache-Control: no-store, no-cache, must-revalidate');
echo json_encode(['logo' => setting_get('site_logo', '')], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);