在用宝塔面板安装tpframe 6.x的时候,可能的错误
安装环境后,运行出现如下类似的错误
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/tpframe/vendor/autoload.php) is not within the allowed path(s): (/www/wwwroot/tpframe/public/:/tmp/:/proc/) in /www/wwwroot/tpframe/public/index.php on line 20
Warning: require(/www/wwwroot/tpframe/vendor/autoload.php): failed to open stream: Operation not permitted in /www/wwwroot/tpframe/public/index.php on line 20
Fatal error: require(): Failed opening required '/www/wwwroot/tpframe/public/../vendor/autoload.php' (include_path='.:/www/server/php/72/lib/php') in /www/wwwroot/tpframe/public/index.php on line 20
这是open_basedir设置问题,目录权限位置不对,然后按如下设置就可以了
这里的/www/wwwroot/tpframe/设置成你自己的tpframe所有目录,保存后重载配置或重启效