详解dedecms织梦远程图片本地化https链接图片无法本地化怎么解决

详解dedecms织梦远程图片本地化https链接图片无法本地化怎么解决,第1张

详解dedecms织梦远程图片本地化https链接图片无法本地化怎么解决

本文详细介绍了如何解决dedecmsDreamweavercms遥控器图片本地化https连接图片无法本地化的相关信息。边肖感觉挺好的,现在分享给大家,给大家做个参考。回来和边肖一起看看。

最近有朋友偶然看到发表的文章,文章里有https的外部站点的图片是没有办法本地化的。以下是解决方案:

在dede//Inc/Inc_archives_functions.php文件中查找编号GetCurContent($body),它

preg_match_all("/src=["|'|s]{0,}(http://([^>]*).(gif|jpg|png))/isU",$body,$img_array); $img_array=array_unique($img_array[1]);

这一段应改为:

preg_match_all("/src=["|'|s]{0,}(http://([^>]*).(gif|jpg|png))/isU",$body,$img_array); preg_match_all("/src=["|'|s]{0,}(https://([^>]*).(gif|jpg|png))/isU",$body,$img_array_https); $img_array=array_unique($img_array[1]); $img_array_https=array_unique($img_array_https[1]); $img_array=array_merge_recursive($img_array,$img_array_https);

第二步:

if(!preg_match("#^http://#i",$ss="superseo">ss="superseo">value)) { continue; }

这一段应改为:

if(!preg_match("#^http://#i",$value)&&!preg_match("#^https://#i",$value)) { continue; }

把它取下来,然后就可以通过贴文章把https的遥控图片本地化了。

文章里的内容就这些了。期待对大家的学习和培训有所帮助,也期待大家的应用。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zz/772036.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-03
下一篇2022-05-03

发表评论

登录后才能评论

评论列表(0条)

    保存