Loading... ### 错误示例 ```apache Warning: is_file(): open_basedir restriction in effect. File(/www/wwwroot/storage/vendor/autoload.php) is not within the allowed path(s): (/www/wwwroot/yoursite/:/tmp/:/www/wwwroot/storage/) in /www/wwwroot/yoursite/system/startup.php on line 70 Warning: is_file(): open_basedir restriction in effect. File(/www/wwwroot/storage/modification/system/engine/action.php) is not within the allowed path(s): (/www/wwwroot/yoursite/:/tmp/:/www/wwwroot/storage/) in /www/wwwroot/edelin_org/system/startup.php on line 62 Warning: is_file(): open_basedir restriction in effect. File(/www/wwwroot/storage/modification/system/engine/controller.php) is not within the allowed path(s): (/www/wwwroot/yoursite/:/tmp/:/www/wwwroot/storage/) in /www/wwwroot/yoursite/system/startup.php on line 62 ``` ### 解决方案 * 宝塔面板:网站设置里的网站目录tab取消防跨站即可。 * 通用方案:网页根目录的user.ini防跨站文件里增加storage文件夹的访问权限 * Before:`open_basedir=/www/wwwroot/yoursite/:/tmp/` * After:`open_basedir=/www/wwwroot/yoursite/:/tmp/:/www/wwwroot/storage/` * 把`yoursite`和`storage`换成你自己的文件夹名 All done. 最后修改:2021 年 04 月 30 日 © 允许规范转载 打赏 赞赏作者 支付宝 赞 0 如果觉得我的文章对你有用,请随意赞赏