
歡迎訪問全國企業網站設計NO.1網站開發商平臺 | 付款方式 |
POST TIME:2020-10-09
織夢會員郵件驗證通知在https域名下驗證鏈接錯誤,程序默認只支持在http://的站點,我們需要改成讓郵件支持http和https均可正常
以下文件如果你的網站里有的的沒有,可跳過
1、打開 /member/index_do.php 找到,大概在31行
$url = 'http://'.preg_replace("#\/\/#i", '/', $url);
把它改成
$server_port = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';
$url = $server_port.preg_replace("/^(http|https):\/\//i", "", trim($url));
2、打開 /member/reg_new.php 找到,大概在250行
$url = 'http://'.preg_replace("#\/\/#", '/', $url);
把它改成
$server_port = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';
$url = $server_port.preg_replace("/^(http|https):\/\//i", "", trim($url));
3、打開 /member/mail.php 找到,大概在76行
$url = 'http://'.eregi_replace('//', '/', $url);
把它改成
$server_port = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';
$url = $server_port.preg_replace("/^(http|https):\/\//i", "", trim($url));