System Error

[2] ErrorException in HomeBaseController.php line 24

Cannot modify header information - headers already sent by (output started at /usr/home/hyu2460840001/htdocs/data/conf/database.php:1)

  1. use app\admin\model\ThemeModel;
  2. use think\View;
  3. class HomeBaseController extends BaseController
  4. {
  5. public function _initialize()
  6. {
  7. if ($_SERVER['HTTP_HOST'] == 'haiwaiguahao.com') {
  8. Header("HTTP/1.1 301 Moved Permanently");
  9. $url = "http://www.haiwaiguahao.com" . $_SERVER['REQUEST_URI'];
  10. Header("Location: $url");
  11. }
  12. // 监听home_init
  13. hook('home_init');
  14. parent::_initialize();
  15. $siteInfo = cmf_get_site_info();
  16. $siteContact = cmf_get_option('site_contact');

Call Stack

  1. in HomeBaseController.php line 24
  2. at Error::appError(2, 'Cannot modify header...', '/usr/home/hyu2460840...', 24, [])
  3. at header('HTTP/1.1 301 Moved P...') in HomeBaseController.php line 24
  4. at HomeBaseController->_initialize() in BaseController.php line 43
  5. at BaseController->__construct(object(Request))
  6. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 216
  7. at App::invokeClass('app\portal\controlle...') in Loader.php line 420
  8. at Loader::controller('index', 'controller', true, 'Error') in App.php line 388
  9. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], null) in App.php line 296
  10. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 124
  11. at App::run() in index.php line 59

Environment Variables

GET Data

id
35346
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

DOCUMENT_ROOT
/usr/home/hyu2460840001/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
HTTP_HOST
haiwaiguahao.com
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
PATH
/bin
PHPRC
/var/www/php55/hichina_ini/hyu2460840001
QUERY_STRING
id=35346
REDIRECT_STATUS
200
REMOTE_ADDR
3.145.191.134
REMOTE_PORT
6738
REQUEST_METHOD
GET
REQUEST_URI
/?id=35346
SCRIPT_FILENAME
/usr/home/hyu2460840001/htdocs/index.php
SCRIPT_NAME
/index.php
SCRIPT_URI
http://haiwaiguahao.com/
SCRIPT_URL
/
SERVER_ADDR
10.17.0.24
SERVER_ADMIN
webmaster@hyu2460840001.my3w.com
SERVER_NAME
haiwaiguahao.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
TZ
Asia/Shanghai
UNIQUE_ID
ZwhHjQoRABgAOgyQSfwAAAAC
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1728595853.3285
REQUEST_TIME
1728595853
Environment Variables
empty

ThinkPHP Constants

APP_DEBUG
true
CMF_ROOT
/usr/home/hyu2460840001/htdocs/
APP_PATH
/usr/home/hyu2460840001/htdocs/app/
CMF_PATH
/usr/home/hyu2460840001/htdocs/simplewind/cmf/
WEB_ROOT
/usr/home/hyu2460840001/htdocs/
PLUGINS_PATH
/usr/home/hyu2460840001/htdocs/plugins/
EXTEND_PATH
/usr/home/hyu2460840001/htdocs/simplewind/extend/
VENDOR_PATH
/usr/home/hyu2460840001/htdocs/simplewind/vendor/
RUNTIME_PATH
/usr/home/hyu2460840001/htdocs/data/runtime/
THINKCMF_VERSION
5.0.170927
THINK_VERSION
5.0.11
THINK_START_TIME
1728595853.3289
THINK_START_MEM
252392
EXT
.php
DS
/
THINK_PATH
/usr/home/hyu2460840001/htdocs/simplewind/thinkphp/
LIB_PATH
/usr/home/hyu2460840001/htdocs/simplewind/thinkphp/library/
CORE_PATH
/usr/home/hyu2460840001/htdocs/simplewind/thinkphp/library/think/
TRAIT_PATH
/usr/home/hyu2460840001/htdocs/simplewind/thinkphp/library/traits/
ROOT_PATH
/usr/home/hyu2460840001/htdocs/
LOG_PATH
/usr/home/hyu2460840001/htdocs/data/runtime/log/
CACHE_PATH
/usr/home/hyu2460840001/htdocs/data/runtime/cache/
TEMP_PATH
/usr/home/hyu2460840001/htdocs/data/runtime/temp/
CONF_PATH
/usr/home/hyu2460840001/htdocs/app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/usr/home/hyu2460840001/htdocs/simplewind/vendor/ezyang/htmlpurifier/library
QINIU_FUNCTIONS_VERSION
7.2.1
ent
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
mobile
/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i
0.090111s