gpt4 book ai didi

php - linux plesk 错误中的 open_basedir

转载 作者:太空宇宙 更新时间:2023-11-04 10:30:06 25 4
gpt4 key购买 nike

我正在尝试从 plesk 中的另一个网站空间加载脚本。我在网络空间中启用了 open_basedir,并在我的脚本中插入了

include "/var/www/vhosts/example.com/httpdocs/app/";

但是这不起作用,我在日志中收到以下错误:

mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/example.com/httpdocs/eshop): failed to open stream: No such file or directory in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2

mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/example.com/httpdocs/app): failed to open stream: No such device in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2


mod_fcgid: stderr: PHP Warning: include(): Failed opening '/var/www/vhosts/example.com/httpdocs/app/' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2

我认为这与我以错误的方式编写路径这一事实有关,但我无法理解什么是正确的。

最佳答案

它不起作用,因为另一个订阅的文件由另一个系统用户拥有。最好将必要的代码放在同一个订阅或某些共享位置,如 /usr/share/pear/usr/share/php:

plesk php include_path

关于php - linux plesk 错误中的 open_basedir,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40365768/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com