1、百度https認證不過
打開 /includes/lib_common.php文件
將
return $uri;
修改為
return ‘http://’.$_SERVER[‘SERVER_NAME’].’/’ . $uri;
或
return (strpos($url, ‘http://’) === false && strpos($url, ‘https://’) === false) ? ‘http://’.$_SERVER[‘SERVER_NAME’].’/’ . $url : $url;
也就是此前講的講站內(nèi)URL地址絕對地址化的內(nèi)容,注意不要用標簽 $web url
2、ecshop部署https后臺無法登錄
打開includes/cls_ecshop.php,查找代碼:
return (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : 'http://';
修改為:
return isset($_SERVER['HTTPS']) || (strtolower($_SERVER['HTTPS']) != 'off')||(strtolower($_SERVER['HTTP_FROM_HTTPS']) == 'on') ? 'https://' : 'http://';
或
if(isset($_SERVER['HTTPS'])){ if($_SERVER['HTTPS'] === 1){ $http = 'https://'; }else if($_SERVER['HTTPS'] === 'on'){ $http = 'https://'; } }else if($_SERVER['SERVER_PORT'] == 443){ $http = 'https://'; }else{ $http = 'http://'; } return $http;
3、打開/goods_script.php文件,找到如下代碼,刪除掉即可
$smarty->assign(‘url’, $ecs->url());
4、打開/data/goods_script.html文件,找到如下代碼,刪除掉即可
{$url}
5、打開/goods.php文件(商品詳細頁面中描述的圖片改為絕對地址)
找到如下代碼:
$smarty->assign(‘goods’, $goods);
在以上這段代碼的上面加:
$goods[‘goods_desc’] = preg_replace(‘/<img src=”/images/’, ‘<img src=”http://’.$_SERVER[‘SERVER_NAME’].’/images’, $goods[‘goods_desc’]);
6打開/includes/lib_insert.php文件(把ECSHOP廣告圖片/data/afficheimg/的相對地址改為絕對地址)
找到如下代碼:
DATA_DIR . “/afficheimg/$row[ad_code]” : $row[‘a(chǎn)d_code’];
將以上這段代碼修改為:
http://’.$_SERVER[‘SERVER_NAME’].’/’ . DATA_DIR . “/afficheimg/$row[ad_code]” : $row[‘a(chǎn)d_code’];