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 [
...
];
config/app.php
添加
//获取跟地址
$root = \think\facade\Request::instance()->root();
$root = str_replace('/index.php', '', $root);
define("__ROOT__", $root);
return [
...
];