首先在application的配置文件config.php中添加:
// 基础替换字符串 use think\Request; $request = Request::instance(); $base = $request->root(); $root = strpos($base, '.') ? ltrim(dirname($base), DS) : $base; if ('' != $root) { $root = '/' . ltrim($root,
TP5中模板内容的替换和全局配置
最新推荐文章于 2021-04-21 15:39:24 发布