[2] ErrorException in Index.php line 14

Cannot modify header information - headers already sent by (output started at /www/wwwroot/dahekongjian/runtime/classmap.php:9)

  1. use think\Db;
  2. use think\Session;
  3. class Index extends Common{
  4. protected function _initialize(){
  5. $res = wp_is_mobile2();
  6. if(wp_is_mobile2()){
  7. header('location:http://m.dh-beijing.com');exit;
  8. }
  9. $this->assign('the_mod','index');
  10. header("Content-type: text/html; charset=utf-8");
  11. parent::_initialize();
  12. }
  13. //首页
  14. public function index(){
  15. //获取banner
  16. $map = ['pid' => 6,'delete' => 0];
  17. $banner_list = Db::table('gq_ad')->where($map)->field('id,title,src')->select();
  18. //公司简介广告
  19. $map = ['id' => 8,'delete' => 0];

Call Stack

  1. in Index.php line 14
  2. at Error::appError(2, 'Cannot modify header...', '/www/wwwroot/dahekon...', 14, ['res' => false])
  3. at header('Content-type: text/h...') in Index.php line 14
  4. at Index->_initialize() in Controller.php line 53
  5. at Controller->__construct(object(Request))
  6. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 251
  7. at App::invokeClass('app\index\controller...') in Loader.php line 410
  8. at Loader::controller('index', 'controller', false, 'Error') in App.php line 377
  9. at App::module(['', null, null], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 140
  10. at App::run() in start.php line 18
  11. at require('/www/wwwroot/dahekon...') in index.php line 30

Exception Datas

Error Context
res false

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /www/wwwroot/dahekongjian/public/index.php
QUERY_STRING
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /
DOCUMENT_URI /index.php
DOCUMENT_ROOT /www/wwwroot/dahekongjian/public
SERVER_PROTOCOL HTTP/2.0
REQUEST_SCHEME https
HTTPS on
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.18.0
REMOTE_ADDR 175.176.44.183
REMOTE_PORT 30197
SERVER_ADDR 172.26.46.22
SERVER_PORT 443
SERVER_NAME www.dh-beijing.com
REDIRECT_STATUS 200
PATH_INFO
HTTP_HOST www.dh-beijing.com
HTTP_SEC_CH_UA "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"
HTTP_SEC_CH_UA_MOBILE ?0
HTTP_SEC_CH_UA_PLATFORM "Windows"
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
HTTP_SEC_FETCH_SITE none
HTTP_SEC_FETCH_MODE navigate
HTTP_SEC_FETCH_USER ?1
HTTP_SEC_FETCH_DEST document
HTTP_ACCEPT_ENCODING gzip, deflate, br, zstd
HTTP_ACCEPT_LANGUAGE en-PH,en-US;q=0.9,en;q=0.8,zh-CN;q=0.7,zh;q=0.6
HTTP_PRIORITY u=0, i
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1730646370.0993
REQUEST_TIME 1730646370
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/dahekongjian/public/../application/
APP_PLUGIN /www/wwwroot/dahekongjian/public/../extend/plugin/
ADMIN_MOD admin
ADMINCP_MOD admincp
UC_AUTH_KEYO 4#5d`a:+VBb$T/-}L_J[FX)q]iQ.*7ncYP(!9psG
THINK_VERSION 5.0.3
THINK_START_TIME 1730646370.0998
THINK_START_MEM 274560
EXT .php
DS /
THINK_PATH /www/wwwroot/dahekongjian/thinkphp/
LIB_PATH /www/wwwroot/dahekongjian/thinkphp/library/
CORE_PATH /www/wwwroot/dahekongjian/thinkphp/library/think/
TRAIT_PATH /www/wwwroot/dahekongjian/thinkphp/library/traits/
ROOT_PATH /www/wwwroot/dahekongjian/
EXTEND_PATH /www/wwwroot/dahekongjian/extend/
VENDOR_PATH /www/wwwroot/dahekongjian/vendor/
RUNTIME_PATH /www/wwwroot/dahekongjian/runtime/
LOG_PATH /www/wwwroot/dahekongjian/runtime/log/
CACHE_PATH /www/wwwroot/dahekongjian/runtime/cache/
TEMP_PATH /www/wwwroot/dahekongjian/runtime/temp/
CONF_PATH /www/wwwroot/dahekongjian/public/../application/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN false
url /
ref
ent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
site http://lao.gge58.com/
road ?road=www.dh-beijing.com/
memes ?road=www.dh-beijing.com/&referer=
regs @BaiduSpider|Sogou|Yisou|Haosou|360Spider@i
mobile /phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/
area false
系统发生错误

[2] ErrorException in Common.php line 14

Cannot modify header information - headers already sent by (output started at /www/wwwroot/dahekongjian/runtime/classmap.php:797)

  1. use think\Session;
  2. use app\index\model\nav;
  3. use app\index\model\District;
  4. use app\index\model\Config;
  5. use app\index\model\Links;
  6. use app\index\model\LinksPosition;
  7. use app\index\model\capital\CapitalMoney;
  8. class Common extends Controller{
  9. protected function _initialize(){
  10. header("Content-Type: text/html; charset=UTF-8");
  11. define('IMG_PATH','http://www.dh-beijing.com');
  12. define('CSS','/static/index/css');
  13. define('IMAGES','/static/index/images');
  14. define('JS','/static/index/js');
  15. //站点信息
  16. $map = ['type' => '1'];
  17. $site = Db::table('gq_config')->where($map)->select();
  18. foreach($site as $k => $v){
  19. $site[$v['cname']] = $v;

Call Stack

  1. in Common.php line 14
  2. at Error::appError(2, 'Cannot modify header...', '/www/wwwroot/dahekon...', 14, [])
  3. at header('Content-Type: text/h...') in Common.php line 14
  4. at Common->_initialize() in Index.php line 10
  5. at Index->_initialize() in Controller.php line 53
  6. at Controller->__construct(object(Request))
  7. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 251
  8. at App::invokeClass('app\index\controller...') in Loader.php line 410
  9. at Loader::controller('index', 'controller', false, 'Error') in App.php line 377
  10. at App::module(['', null, null], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 140
  11. at App::run() in start.php line 18
  12. at require('/www/wwwroot/dahekon...') in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /www/wwwroot/dahekongjian/public/mobile_web/index.php
QUERY_STRING
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /
DOCUMENT_URI /index.php
DOCUMENT_ROOT /www/wwwroot/dahekongjian/public/mobile_web
SERVER_PROTOCOL HTTP/1.1
REQUEST_SCHEME http
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.18.0
REMOTE_ADDR 18.118.162.20
REMOTE_PORT 55461
SERVER_ADDR 172.26.46.22
SERVER_PORT 80
SERVER_NAME m.dh-beijing.com
REDIRECT_STATUS 200
PATH_INFO
HTTP_HOST m.dh-beijing.com
HTTP_CONNECTION keep-alive
HTTP_PRAGMA no-cache
HTTP_CACHE_CONTROL no-cache
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
HTTP_ACCEPT_ENCODING gzip, deflate
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1734249093.6471
REQUEST_TIME 1734249093
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/wwwroot/dahekongjian/public/mobile_web/../../appweb/
APP_PLUGIN /www/wwwroot/dahekongjian/public/mobile_web/../../extend/plugin/
ADMIN_MOD admin
ADMINCP_MOD admincp
UC_AUTH_KEYO 4#5d`a:+VBb$T/-}L_J[FX)q]iQ.*7ncYP(!9psG
THINK_VERSION 5.0.3
THINK_START_TIME 1734249093.6477
THINK_START_MEM 263600
EXT .php
DS /
THINK_PATH /www/wwwroot/dahekongjian/thinkphp/
LIB_PATH /www/wwwroot/dahekongjian/thinkphp/library/
CORE_PATH /www/wwwroot/dahekongjian/thinkphp/library/think/
TRAIT_PATH /www/wwwroot/dahekongjian/thinkphp/library/traits/
ROOT_PATH /www/wwwroot/dahekongjian/
EXTEND_PATH /www/wwwroot/dahekongjian/extend/
VENDOR_PATH /www/wwwroot/dahekongjian/vendor/
RUNTIME_PATH /www/wwwroot/dahekongjian/runtime/
LOG_PATH /www/wwwroot/dahekongjian/runtime/log/
CACHE_PATH /www/wwwroot/dahekongjian/runtime/cache/
TEMP_PATH /www/wwwroot/dahekongjian/runtime/temp/
CONF_PATH /www/wwwroot/dahekongjian/public/mobile_web/../../appweb/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN false
url /
ent Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
site http://wap.dfe82.com/
ref noref
road ?road=m.dh-beijing.com/&refs=noref&ua=Mozilla/5.0AppleWebKit/537.36(KHTML,likeGecko;compatible;ClaudeBot/1.0;+claudebot@anthropic.com)&ips=18.118.162.20
waps @Android|Browser|Mobile|Wap|iOs|aiduboxapp|iPad|iPhone|iPod@i
regs @Baidu|Sogou|Yisou|Sm.cn|Bytespider|360|So.com|Toutiao.com@i
area false