thinkphp5 自定义配置目录 public/index.php 加上这句话 //定义配置目录define('CONF_PATH',__DIR__ .'/../config/'); 根目录新建config文件夹,新建config.php文件