lvhao 18 timmar sedan
förälder
incheckning
d2eddee463
1 ändrade filer med 7 tillägg och 1 borttagningar
  1. 7 1
      core/CoreApp/config/config.php

+ 7 - 1
core/CoreApp/config/config.php

@@ -1,7 +1,13 @@
 <?php
 defined('BASEPATH') OR exit('No direct script access allowed');
 
-$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/'; //CodeIgniter根URL
+//因为报错会暴漏这里的路径 所以写成了这样的 如果有问题 会恢复的
+if(isset($_SERVER['HTTP_HOST'])){
+    $config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/'; //CodeIgniter根URL
+}else{
+    $config['base_url'] = '/'; //CodeIgniter根URL
+}
+
 $config['index_page'] = ''; //默认的索引文件 index.php
 $config['uri_protocol']	= 'REQUEST_URI'; //RUL链接 PATH_INFO
 $config['url_suffix'] = '.html'; //设置所有URL后缀