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

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

解决方案一:

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

具体修改地方是/include/dedehttpdown.class.php 第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, $errno, $errstr,
10);

 

解决方案二:

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

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

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。