发布于 4年前

thinkphp Use of undefined constant __ROOT__

config/app.php添加

//获取跟地址
$root = \think\facade\Request::instance()->root();
$root = str_replace('/index.php', '', $root);
define("__ROOT__", $root);

return [
...
];
©2020 edoou.com   京ICP备16001874号-3