前端之家收集整理的这篇文章主要介绍了
织梦dedecms不能下载远程图片实现图片本地化解决方法,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
服务器上的运行环境中禁用了
fsockopen()@H_502_4@函数
在用
fsockopen()@H_502_4@的地方用stream_socket_client()@H_502_4@函数代替。
具体
修改地方是
/include/dedehttpdown.class.PHP@H_502_4@ 第507行
-
$this->m_fp = @fsockopen($this->m_host,$this->m_port,$errno,$errstr,10);
替换为
-
$this->m_fp = @stream_socket_client($this->m_host . ':' . $this->m_port,10);
编辑
PHP.ini@H_502_4@,找到disable_functions@H_502_4@,把其中的fsockopen@H_502_4@去掉