首页 >> 文档中心 >> 模板教程
在admin-config.php中,建议使用白名单方式校验配置项,确保只允许预期的字段被写入。
$scfgAllowed = ['ex_brand', 'ex_theme', 'ex_nav_limit', 'ex_about_alias']; foreach ($scfgAllowed as $key) { $val = post($key); if ($val !== null) { set_config($key, $val); } }
扫码关注我们