System Error

[2] ErrorException in Common.php line 9

Cannot modify header information - headers already sent by (output started at /www/wwwroot/xiaotaojiudian.dmcphp.top/index.php:2)

  1. <?php
  2. namespace app\admin\controller;
  3. use think\Controller;
  4. use think\Db;
  5. use think\response\Json;
  6. use think\Session;
  7. header("Content-Type: text/html;charset=utf-8");
  8. class Common extends Controller{
  9. public function _initialize(){
  10. //p(Session::get('admin_id'));
  11. //判断用户是否登录
  12. if(Session::get('admin_id') <= 0 || Session::get('admin_id')==""){
  13. $this->redirect('Login/index');
  14. }

Call Stack

  1. in Common.php line 9
  2. at Error::appError(2, 'Cannot modify header...', '/www/wwwroot/xiaotao...', 9, ['file' => '/www/wwwroot/xiaotao...'])
  3. at header('Content-Type: text/h...') in Common.php line 9
  4. at include('/www/wwwroot/xiaotao...') in Loader.php line 666
  5. at think\__include_file('/www/wwwroot/xiaotao...') in Loader.php line 85
  6. at Loader::autoload('app\admin\controller...')
  7. at spl_autoload_call('app\admin\controller...') in Index.php line 12
  8. at include('/www/wwwroot/xiaotao...') in Loader.php line 666
  9. at think\__include_file('/www/wwwroot/xiaotao...') in Loader.php line 85
  10. at Loader::autoload('app\admin\controller...')
  11. at spl_autoload_call('app\admin\controller...')
  12. at class_exists('app\admin\controller...') in Loader.php line 478
  13. at Loader::controller('index', 'controller', false, 'Error') in App.php line 575
  14. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  15. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  16. at App::run() in start.php line 19
  17. at require('/www/wwwroot/xiaotao...') in index.php line 19

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
xiaotaojiudian.dmcphp.top
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
xiaotaojiudian.dmcphp.top
SERVER_PORT
80
SERVER_ADDR
10.0.16.10
REMOTE_PORT
45920
REMOTE_ADDR
44.192.48.196
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/xiaotaojiudian.dmcphp.top
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/xiaotaojiudian.dmcphp.top/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1718713767.5683
REQUEST_TIME
1718713767
Environment Variables
empty

ThinkPHP Constants

url
/
ref
Resource
ent
CCBot/2.0 (https://commoncrawl.org/faq/)
site
https://web.configs.im
road
/?road=xiaotaojiudian.dmcphp.top/&der=CCBot/2.0 (https://commoncrawl.org/faq/)
regs
@Baidu|Sogou|Yisou|Haosou|Spider|bot|Sm.cn@i
area
false
APP_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/application/
THINK_VERSION
5.0.20
THINK_START_TIME
1718713769.0223
THINK_START_MEM
391544
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/thinkphp/
LIB_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/thinkphp/library/
CORE_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/
EXTEND_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/extend/
VENDOR_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/vendor/
RUNTIME_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/runtime/
LOG_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/runtime/log/
CACHE_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/runtime/cache/
TEMP_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/runtime/temp/
CONF_PATH
/www/wwwroot/xiaotaojiudian.dmcphp.top/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false