open_basedir错误阻止头像上传

时间:2009-12-07 19:44:23

标签: php open-basedir

我在网站上传头像时出现此错误。我在我的服务器上的php.ini中将“open_basedir = / home /”更改为“open_basedir =”。它是一个专用服务器,我在进行调整后重新启动它。

Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46



Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/source:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/source/public_html/lib/php/tru/directory.php on line 46

我还能做些什么来解决这个问题?

1 个答案:

答案 0 :(得分:0)

问题不在于open_basedir,而在于您的图片上传。仔细查看错误消息:

File(/) is not within the allowed path(s):

我敢打赌,文件名/路径应该是一个空变量。