提交 527d28ec 编写于 作者: huangxuan258's avatar huangxuan258

优化获取域名环境变量,防止多域名解析获取错误的域名导致配置不生效

上级 5142e8c6
......@@ -88,7 +88,7 @@ class CI_Controller {
$this->load->library ( 'encrypt' );
}
if (strstr ( trim ( config_item ( 'mobile_domain' ) ), $_SERVER ['SERVER_NAME'] )) {
if (strstr ( trim ( config_item ( 'mobile_domain' ) ), $_SERVER ['HTTP_HOST'] )) {
defined ( 'SITE_URL' ) or define ( 'SITE_URL', config_item ( 'mobile_domain' ) );
} else {
defined ( 'SITE_URL' ) or define ( 'SITE_URL', config_item ( 'base_url' ) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册