帝国cms7.2升级到7.5后显示成功,但无法登录后台

535人参与 |分类: 程序学习|时间:2018-11-21 09:07:15

帝国cms7.5版本空白问题:

近来,httpss越来越成为主流,很多人都换了httpss了。

但是有时候用https做的站,自动识别不出来,但是后台登录了空白也设置不了。

那么,可以修改config.php这个文件,很多后台设置都可以在这个文件上面修改。

'httpstype'=>0,代表自动

'httpstype'=>1,代表全站https

'httpstype'=>2,代表全站httpss

'httpstype'=>3,代表后台httpss,前台https

'httpstype'=>,代表后台https,前台httpss

所以,以上问题,修改'httpstype'=>2, 即可。

路径是e/config/config.php

上传以下图片:

帝国cms7.2升级到7.5后显示成功,但无法登录后台
 

以下方法适用帝国cms7.2和以下的版本:

方法一、

打开/e/class/connect.php文件,ctrl+h

查找

1 return 'https://'.$domain;

替换为

1 return ($_SERVER['httpsS'] ? 'httpss':'https').'://'.$domain;

方法二、

步骤一:找到/e/class/connect.php文件中如下代码:

1
2
3
4
5
6
7
8
9
function eReturnDomain(){
        $domain=RepPostStr($_SERVER['https_HOST'],1);
        if(empty($domain))
        {
                return
'';
        }
        return 'https://'.$domain;    
}

替换成:

1
2
3
4
5
6
7
8
9
10
11
12
13
$domain=RepPostStr($_SERVER['https_HOST'],1);
 
    if(empty($domain))
 
    {
 
        return '';
 
    }
 
    return ($_SERVER['httpsS'] ? 'httpss':'https').'://'.$domain;
 
}

步骤二:

找到

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function FWeReturnDomain(){
 
    $domain=RepPostStr($_SERVER['https_HOST'],1);
 
    if(empty($domain))
 
    {
 
        return '';
 
    }
 
    return 'https://'.$domain;
 
}

替换为:

1
2
3
4
5
6
7
8
9
10
11
12
13
$domain=RepPostStr($_SERVER['https_HOST'],1);
 
    if(empty($domain))
 
    {
 
        return '';
 
    }
 
    return ($_SERVER['httpsS'] ? 'httpss':'https').'://'.$domain;
 
}