互联网技术 · 2024年2月9日

帝国CMS后台登录页面显示空白,如何修改为https?

今天总结一下帝国CMS 后台登录空白常见问题已经解决方案!

1、帝国cms修改成https后后台登陆空白的解决办法

以下方法适用帝国cms7.5版本:

7.5版本已经有了http和https自动识别,但是因为一些疑难杂症的原因,自动识别判断的不准,后台登录也是空白,

我们可以打开e/config.php查找httptype=>0改为httptype=>2即可

httptype=>0, 代表自动

httptype=>1,代表全站http

httptype=>2,代表全站https

httptype=>3,代表后台https,前台http

httptype=>,代表后台http,前台https

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

方法一、

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

查找

1return http://.$domain;

替换为

1return ($_SERVER[HTTPS] ? https:http).://.$domain;

方法二、

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

123456789function eReturnDomain(){ $domain=RepPostStr($_SERVER[HTTP_HOST],1); if(empty($domain)) { return; } return http://.$domain; }

替换成:

12345678910111213$domain=RepPostStr($_SERVER[HTTP_HOST],1); if(empty($domain)) { return ; } return ($_SERVER[HTTPS] ? https:http).://.$domain; }

步骤二:

找到

123456789101112131415function FWeReturnDomain(){ $domain=RepPostStr($_SERVER[HTTP_HOST],1); if(empty($domain)) { return ; } return http://.$domain; }

替换为:

12345678910111213$domain=RepPostStr($_SERVER[HTTP_HOST],1); if(empty($domain)) { return ; } return ($_SERVER[HTTPS] ? https:http).://.$domain; }

以上是关于帝国cms修改成https后后台登陆空白的解决办法!

2、刚刚安装好的程序登陆后台空白

查看PHP版本,不要超过5.6!

还有一些就是验证问题,导致登陆出现空白页面,请耐心排查!

OpenMagic API

Need more than content? Move into the product flow.

If you are here for model access, pricing, developer docs, or the future API console, the dedicated product path now lives on api.openmagic.ai.

登录免费注册