This article mainly introduces that DreamWeaver dedecms cannot download remote imagespicturesTo achieve image localization solutions, friends who need it can refer to the
dedecms template download address: m.sbmmt.com/xiazai/code/dedecms
The main reason why DEDE image localization fails :
fsockopen() is disabled in the running environment on the serverFunction
Solution 1:
When using fsockopen() Use the stream_socket_client() function instead.
The specific modification place is line 507 of /include/dedehttpdown.class.php
$this->m_fp = @fsockopen($this->m_host, $this->m_port, $errno, $errstr,10);
is replaced with
$this->m_fp = @stream_socket_client($this->m_host . ':' . $this->m_port, $errno, $errstr,10);
##. #Solution 2:
fsockopen
If the above solution cannot be solved, then analyze Check whether allow_url_fopen in the php.iniconfiguration file is turned on;
The above is the detailed content of Two solutions for dedecms unable to download remote images to achieve image localization. For more information, please follow other related articles on the PHP Chinese website!