后台发布上传商品图片外部URL出现错误

2016-07-07 15:11 来源:www.chinab4c.com 作者:ecshop专家

后台编辑商品信息-通用信息处,上传商品图片外部URL。 QQ截图20140318100812.png


填写完后点确认,出现如下错误。。我在本地测试的时候是正常的,在空间里就这样了,不知怎么回事

Warning: copy() [function.copy]: php_network_getaddresses: gethostbyname failed. errno=0 in E:\freehost\gouwuyo\web\admin\goods.php on line 638

Warning: copy() [function.copy]: failed to open stream: php_network_getaddresses: gethostbyname failed. errno=0 in E:\freehost\gouwuyo\web\admin\goods.php on line 638

Warning: copy() [function.copy]: The first argument to copy() function cannot be a directory in E:\freehost\gouwuyo\web\admin\goods.php on line 656

回答:
admin\goods.php出现错误的地方我找出来了,但看不懂

638elseif (copy(trim($_POST['goods_img_url']), ROOT_PATH . 'temp/' . basename($_POST['goods_img_url'])))

656if (!copy('../' . $img, '../' . $newname))



很奇怪,本地环境测试一切正常,放到虚拟主机就出现错误,有朋友知道什么情况吗?