THinkPHP 中获取网站根目录文件夹路径 public function getRoot(){ $d = $_SERVER['DOCUMENT_ROOT']; var_dump($d) 打印网站根目录; }