1. 首页
  2. 源码

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

DEDE图片本地化失效的主要原因: 服务器上的运行环境中禁用了fsockopen()函数 解决方案一: 在用fsockopen()的地方用stream_socket_client()函数代替。 具体修改地方是 /include/dedehttpdown.class.php 第507行 $this->m_fp = @fsockopen($this->m_host, $this->m_port, $

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是否是开启状态;

注:相关教程知识阅读请移步到dedecms教程频道。
织梦安装教程 通用图文说明https://www.nanrenca.com/5928.html

相关关键词:dede模板|织梦免费模板|免费模板下载|网站源码|织梦模板|Flash网站模板

原创文章,作者:技术宅,如若转载,请注明出处:https://www.nanrenca.com/979.html

发表评论

邮箱地址不会被公开。 必填项已用*标注

联系我们

400-800-8888

在线咨询:点击这里给我发消息

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息