Zhimeng dedecms cannot download remote images to implement image localization.

Source: Internet
Author: User
This article mainly introduces how dedecms can not download remote images to implement image localization, the need of friends can refer to the next article mainly introduced the dream dedecms can not download remote # css/css-rwd-images.html "target =" _ blank "> Image localization solution, for more information, see

Dedecms Template: www.php1.cn/xiazai/code/dedecms

The main cause of DEDE Image localization failure:
The fsockopen () function is disabled in the running environment on the server.

Solution 1:

Use the stream_socket_client () function in place of fsockopen.

The specific modification is/include/dedehttpdown. class. php row 507th.

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

Replace

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

Solution 2:

Edit php. ini, find disable_functions, and remove fsockopen from it.

If the preceding solution cannot be solved, check whether allow_url_fopen in the php. ini configuration file is enabled;

The above is the details of the two solutions to achieve Image localization without downloading remote images in dedecms. For more information, see other related articles in the first PHP community!

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.