2009-12-07 21 views
0

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

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

+0

你有没有检查你只有一个php.ini文件?无需重新启动,只需重新启动apache与apachectl重新启动http://www.electrictoolbox.com/article/apache/restart-apache/ – Cups 2009-12-07 21:59:05

回答

0

问题不在于open_basedir,它在你的图片上传中。仔细看看错误信息:

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

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