主頁 > 網(wǎng)站建設(shè) > 建站知識 > dede(織夢)不能下載遠(yuǎn)程圖片實現(xiàn)圖片本地化解決

dede(織夢)不能下載遠(yuǎn)程圖片實現(xiàn)圖片本地化解決

POST TIME:2017-11-12 23:40

DEDE圖片本地化失效的主要原因:
服務(wù)器上的運行環(huán)境中禁用了fsockopen()函數(shù)

解決方案一:

在用fsockopen()的地方用stream_socket_client()函數(shù)代替。

具體修改地方是 /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是否是開啟狀態(tài);


上一篇:dedecms專題內(nèi)容頁{dede:field.note /}節(jié)點排序的方法

下一篇:DEDE保存TAGS標(biāo)簽之InsertTags函數(shù)

收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266