thinkphp
thinkphp copied to clipboard
Use of undefined constant REDIS_HOST - assumed 'REDIS_HOST'
在Apache或者Nginx环境下均存在无法加载配置文件的问题。会出现 Use of undefined constant REDIS_HOST - assumed 'REDIS_HOST' 这个错误,发现其原因是因为无法加载config.php这个配置文件引起的,若将应用目录下config.php文件中的 require_once 'config.php';改为 require_once './config.php';错误消失。但是在部分版本的PHP中又不需要修改就能正常运行。 系统windows 10 x64 Apache 2.4.23 nginx 1.15.6 以下版本不正常 7.0.32 7.2.12 以下版本正常 7.0.10