原码笔记

原码笔记

织梦开启多站点支持后下载地址填https出错的修复方法

小诸哥 0

现在大多的网站都启用了https://的加密访问,对于一些使用了织梦程序的网站,如果在后台系统参数中启用了多站点支持的绝对路径后,对于软件模型的下载地址填https://会链接出错,织梦开启绝对路径后软件模型,下载地址填https://开头的,调用出来会显示,域名+https://网址,本文对些错误进行了修复,解决方法如下: 

1、打开 /plus/download.php 找到 大概在 147行:

if(!preg_match("#^http:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link))

改成:

if(!preg_match("#^http:\/\/|^https:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link))

继续找到,大概在 159行:

#http

改成:

#(http|https)

2、打开 /include/taglib/channel/softlinks.lib.php 找到大概在 87行:

if(!preg_match("#^http:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link))

改成:

if(!preg_match("#^http:\/\/|^https:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link))

继续找到,大概在 109行:

#http

改成:

#(http|https)

经过以上几个步骤即可解决下载地址填https://链接出错。

标签: https 织梦 下载地址