请问DEDECMS远程图片遇到Https无法本地化解决办法
-
修改
inc_archives_functions.php
文件- 找到
GetCurContent($body)
函数中的正则表达式:preg_match_all("/src=['\"\\s]{0,}(http://([^>]*).(gif|jpg|png|jpeg|bmp))/isU", $body, $img_array);
- 修改为:
preg_match_all("/src=['\"\\s]{0,}(http://([^>]*).(gif|jpg|png|jpeg|bmp))/isU", $body, $img_array); preg_match_all("/src=['\"\\s]{0,}(https://([^>]*).(gif|jpg|png|jpeg|bmp))/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
判断条件- 找到:
if(!preg_match("#^http://#i", $value)) { continue; }
- 修改为:
if(!preg_match("#^http://#i", $value) && !preg_match("#^https://#i", $value)) { continue; }
- 找到:
登录DEDECMS提示用户名不存在的原因及解决办法
- 检查数据库
- 使用
phpMyAdmin
等工具进入数据库,查看dede_admin
表中的用户名是否正确。
- 使用
图文资讯出现错位的解决方法
更新时间:2025-04-10 23:42:04
上一篇:请问PbootCMS 模板后台编辑器无法上传图片,提示“后端配置项没有正常加载,上传插件不能正常使用!”如何解决?
下一篇:请问PbootCMS 后台登录验证码不显示的解决方案
转载请注明原文链接:https://www.muzicopy.com/suibi/3205.html