搜索

首页  >  问答  >  正文

open_basedir 限制生效。文件(/)不在允许的路径内:

<p>我在网站上上传头像时遇到此错误。我以前从未得到过它,并且最近没有任何更改让我开始收到此错误......</p> <pre class="brush:php;toolbar:false;">Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s):</pre> <p><br /></p>
P粉248602298P粉248602298534 天前586

全部回复(2)我来回复

  • P粉659378577

    P粉6593785772023-08-24 14:26:58

    要解决此错误,您必须编辑文件 httpd.conf。 之前可以在 phpinfo 中的 apache2handler 部分指令 Server Root 中看到。 例如我的例子是这样的——/etc/httpd/httpd.conf。 打开文件httpd.conf,找到参数open_basedir。并将其设置为无。 (php_admin_value open_basedir 无

    回复
    0
  • P粉006540600

    P粉0065406002023-08-24 14:05:47

    修改您的托管帐户中的 open_basedir 设置并将其设置为 none。找到 Plesk/cPanel 的“PHP 设置”区域下给出的 open_basedir 设置。从那里给出的下拉列表中将其设置为“无”。 我已在 Plesk 面板图片中展示了它们。

    回复
    0
  • 取消回复