Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: require(): open_basedir restriction in effect. #1

Open
yidongxu125 opened this issue Jun 26, 2024 · 1 comment
Open

Warning: require(): open_basedir restriction in effect. #1

yidongxu125 opened this issue Jun 26, 2024 · 1 comment

Comments

@yidongxu125
Copy link

运行环境:宝塔面板81
已经配置puhlic运行路径和伪静态,
运行提示:Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/api.ddns.top/public../../Hulicore.php) is not within the allowed path(s): (/www/wwwroot/api.ddns.top/public/:/tmp/) in /www/wwwroot/api.ddns.top/public/index.php on line 15

Warning: require(/www/wwwroot/api.ddns.top/public../../Hulicore.php): failed to open stream: Operation not permitted in /www/wwwroot/api.ddns.top/public/index.php on line 15

Fatal error: require(): Failed opening required '/www/wwwroot/api.ddns.top/public../../Hulicore.php' (include_path='.:') in /www/wwwroot/api.ddns.top/public/index.php on line 15

@BIYUEHU
Copy link
Owner

BIYUEHU commented Jul 13, 2024

  1. 请确保 php 有文件读取权限
  2. 在宝塔的 网站设置 -> 网站目录 中,取消勾选 防跨站攻击

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants