修改PHP配置中的open_basedir设置(请参阅 运行时配置)。
该open_basedir设置主要用于防止特定用户的PHP脚本访问另一个用户帐户中的文件。因此,通常,您自己的帐户中的任何文件都应该可以被您自己的脚本读取。
通过.htaccessPHP在Linux系统上是否作为Apache模块运行的示例设置:
<DirectoryMatch '/home/sites/site81/'> PHP_admin_value open_basedir '/home/sites/site81/:/tmp/:/'</DirectoryMatch>解决方法
我在网站上的头像上传中遇到此错误。我从来没有得到过它,最近没有任何改变让我开始收到此错误…
Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s):