织梦dedecms不能下载远程图片实现图片本地化解决方法

DEDE图片本地化失效的主要原因:

服务器上的运行环境中禁用了
fsockopen()函数

解决方案一:

在用
fsockopen()的地方用
stream_socket_client()函数代替。

具体修改地方是
/include/dedehttpdown.class.php 第507行

  1. $this->m_fp = @fsockopen($this->m_host, $this->m_port, $errno, $errstr,10);

替换为

  1. $this->m_fp = @stream_socket_client($this->m_host . ‘:’ . $this->m_port, $errno, $errstr,10);


解决方案二:

编辑
php.ini,找到
disable_functions,把其中的
fsockopen去掉

若上述方案无法解决,那么分析下
php.ini配置文件中
allow_url_fopen是否是开启状态;

织梦dedecms不能下载远程图片实现图片本地化解决方法

相关文章:

你感兴趣的文章:

标签云: