js333线路检测中心(中国)-搜狗百科

[2] ErrorException in Cookie.php line 97

Cannot modify header information - headers already sent by (output started at /mnt/www/test.hefaenergy.com/runtime/classmap.php:677)

  1. }
  2. $name = $config['prefix'] . $name;
  3. // 设置cookie
  4. if (is_array($value)) {
  5. array_walk_recursive($value, 'self::jsonFormatProtect', 'encode');
  6. $value = 'think:' . json_encode($value);
  7. }
  8. $expire = !empty($config['expire']) ? $_SERVER['REQUEST_TIME'] + intval($config['expire']) : 0;
  9. if ($config['setcookie']) {
  10. setcookie($name, $value, $expire, $config['path'], $config['domain'], $config['secure'], $config['httponly']);
  11. }
  12. $_COOKIE[$name] = $value;
  13. }
  14. /**
  15. * 永久保存Cookie数据
  16. * @param string $name cookie名称
  17. * @param mixed $value cookie值
  18. * @param mixed $option 可选参数 可能会是 null|integer|string

Call Stack

  1. in Cookie.php line 97
  2. at Error::appError(2, 'Cannot modify header...', '/mnt/www/test.hefaen...', 97, ['name' => 'all_sub_news', 'value' => '6', 'option' => ['expire' => 3600], ...])
  3. at setcookie('all_sub_news', '6', 1713469541, '/', '', false, false) in Cookie.php line 97
  4. at Cookie::set('all_sub_news', '6', 3600) in helper.php line 339
  5. at cookie('all_sub_news', '6', 3600) in HfWeb1NewsCat.php line 42
  6. at HfWeb1NewsCat->get_all_sub('6', 0, 0) in News.php line 197
  7. at News->catlist('6')
  8. at ReflectionMethod->invokeArgs(object(News), ['6']) in App.php line 196
  9. at App::invokeMethod([object(News), 'catlist'], []) in App.php line 412
  10. at App::module('index/news/catlist//...', ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...], null) in App.php line 295
  11. at App::exec(['type' => 'module', 'module' => 'index/news/catlist//...'], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...]) in App.php line 123
  12. at App::run() in start.php line 18
  13. at require('/mnt/www/test.hefaen...') in index.php line 17

Exception Datas

Error Context
name all_sub_news
value 6
option { "expire": 3600 }
config { "prefix": "", "expire": 3600, "path": "\/", "domain": "", "secure": false, "httponly": "", "setcookie": true }
expire 1713469541

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

PHPSESSID
960vrm6c7t3rfkdm3jq4j01t35
Session
empty

Server/Request Data

REDIRECT_PATH_INFO
news/catlist/c_id/6.html
REDIRECT_STATUS
200
HTTP_USER_AGENT
Go-http-client/1.1
HTTP_HOST
www.hefaenergy.com
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip
HTTP_COOKIE
PHPSESSID=960vrm6c7t3rfkdm3jq4j01t35
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.hefaenergy.com
SERVER_ADDR
120.76.200.46
SERVER_PORT
80
REMOTE_ADDR
50.3.173.110
DOCUMENT_ROOT
/mnt/www/test.hefaenergy.com
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/mnt/www/test.hefaenergy.com/index.php
REMOTE_PORT
51508
REDIRECT_URL
/news/catlist/c_id/6.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
//news/catlist/c_id/6.html
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1713465941.711
REQUEST_TIME
1713465941
PATH_INFO
news/catlist/c_id/6.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/mnt/www/test.hefaenergy.com/application/
THINK_VERSION
5.0.9
THINK_START_TIME
1713465941.7119
THINK_START_MEM
256024
EXT
.php
DS
/
THINK_PATH
/mnt/www/test.hefaenergy.com/thinkphp/
LIB_PATH
/mnt/www/test.hefaenergy.com/thinkphp/library/
CORE_PATH
/mnt/www/test.hefaenergy.com/thinkphp/library/think/
TRAIT_PATH
/mnt/www/test.hefaenergy.com/thinkphp/library/traits/
ROOT_PATH
/mnt/www/test.hefaenergy.com/
EXTEND_PATH
/mnt/www/test.hefaenergy.com/extend/
VENDOR_PATH
/mnt/www/test.hefaenergy.com/vendor/
RUNTIME_PATH
/mnt/www/test.hefaenergy.com/runtime/
LOG_PATH
/mnt/www/test.hefaenergy.com/runtime/log/
CACHE_PATH
/mnt/www/test.hefaenergy.com/runtime/cache/
TEMP_PATH
/mnt/www/test.hefaenergy.com/runtime/temp/
CONF_PATH
/mnt/www/test.hefaenergy.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false