瀏覽代碼

fix of the vhost problem

teepe 23 年之前
父節點
當前提交
40dc91f563
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      functions/strings.php

+ 4 - 0
functions/strings.php

@@ -300,7 +300,11 @@ function get_location () {
         $host = $HTTP_HOST;
     } else if (isset($SERVER_NAME) && !empty($SERVER_NAME)) {
         $host = $SERVER_NAME;
+    } else if (isset($HTTP_SERVER_VARS['SERVER_NAME']) &&
+               !empty($HTTP_SERVER_VARS['SERVER_NAME'])) {
+        $host = $HTTP_SERVER_VARS['SERVER_NAME'];
     }
+
     
     $port = '';
     if (! strstr($host, ':')) {