Weaving dream dedecms cannot download remote images two solutions for image localization

Source: Internet
Author: User
This article mainly introduces the weaving dream dedecms can not download remote http://www.php.cn/css/css-rwd-images.html "target=" _blank "> Picture implementation of the image localization solution, the need for friends to refer to the next

Dedecms template Download Address: www.php.cn/xiazai/code/dedecms

Dede The main reasons for the localization failure of pictures:
The Fsockopen () function is disabled in the running environment on the server

Solution One:

Replace with the stream_socket_client () function where Fsockopen () is used.

The specific modification place is/include/dedehttpdown.class.php line No. 507

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

Replaced by

$this->m_fp = @stream_socket_client ($this->m_host. ':' . $this->m_port, $errno, $ERRSTR, 10);

Solution Two:

Edit PHP.ini, find Disable_functions, remove the fsockopen

If the above scheme can not solve, then the analysis of the php.ini configuration file allow_url_fopen is open state;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.