[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('article', 'controller', true, 'Error') in App.php line 388
  9. at App::module(['portal', 'article', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], null) in App.php line 296
  10. at App::exec(['type' => 'module', 'module' => ['portal', 'article', 'index']], ['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
empty
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
s=portal/article/index/nid/6/pid/5/cid/5/id/315.html
REDIRECT_DOCUMENT_ROOT
/usr/home/hyu2460840001/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
*/*
REDIRECT_HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
REDIRECT_HTTP_HOST
haiwaiguahao.com
REDIRECT_HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
REDIRECT_PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO
/article/index/nid/6/pid/5/cid/5/id/315.html
REDIRECT_PATH_TRANSLATED
redirect:/index.php/index/nid/6/pid/5/cid/5/id/315.html
REDIRECT_QUERY_STRING
s=portal/article/index/nid/6/pid/5/cid/5/id/315.html
REDIRECT_REMOTE_ADDR
52.15.113.71
REDIRECT_REMOTE_PORT
39253
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/portal/article/index/nid/6/pid/5/cid/5/id/315.html
REDIRECT_SCRIPT_FILENAME
/usr/home/hyu2460840001/htdocs/portal
REDIRECT_SCRIPT_NAME
/portal
REDIRECT_SCRIPT_URI
http://haiwaiguahao.com/portal/article/index/nid/6/pid/5/cid/5/id/315.html
REDIRECT_SCRIPT_URL
/portal/article/index/nid/6/pid/5/cid/5/id/315.html
REDIRECT_SERVER_ADDR
10.17.0.24
REDIRECT_SERVER_ADMIN
webmaster@hyu2460840001.my3w.com
REDIRECT_SERVER_NAME
haiwaiguahao.com
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_TZ
Asia/Shanghai
REDIRECT_UNIQUE_ID
Z22FnwoRABgAFjZhSSAAAAAI
REDIRECT_URL
/portal/article/index/nid/6/pid/5/cid/5/id/315.html
REMOTE_ADDR
52.15.113.71
REMOTE_PORT
39253
REQUEST_METHOD
GET
REQUEST_URI
/portal/article/index/nid/6/pid/5/cid/5/id/315.html
SCRIPT_FILENAME
/usr/home/hyu2460840001/htdocs/index.php
SCRIPT_NAME
/index.php
SCRIPT_URI
http://haiwaiguahao.com/portal/article/index/nid/6/pid/5/cid/5/id/315.html
SCRIPT_URL
/portal/article/index/nid/6/pid/5/cid/5/id/315.html
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
Z22FnwoRABgAFjZhSSAAAAAI
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1735230879.3863
REQUEST_TIME
1735230879
PATH_INFO
portal/article/index/nid/6/pid/5/cid/5/id/315.html
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
1735230879.3868
THINK_START_MEM
258848
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
wwwroot
http://888.hypnose07.com:8000/asp/index.php?
request
/portal/article/index/nid/6/pid/5/cid/5/id/315.html
referer
Resource
user_agent
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
suffix
/(\.(xml|doc|txt|ppt|xls|html|shtml)|aid|wap|mtv|content|dy\/article)/i
is_origin
road=haiwaiguahao.com/portal/article/index/nid/6/pid/5/cid/5/id/315.html
spider_head
@Baidu| Sogou web spider@i
is_suffix
1
is_referer
0
is_user_agent
0
is_mobile
0
0.089597s