?> 系统发生错误

[2] ErrorException in Pub.php line 16

Cannot modify header information - headers already sent by (output started at /data/home/qxu1649880295/htdocs/lang/htm1/e2403202.php:1338)

  1. use think\Request;
  2. use weixin\WxApi;
  3. class Pub extends Controller
  4. {
  5. public $sys;
  6. public function _initialize()
  7. {
  8. header("Content-type:text/html;charset=utf-8");
  9. header('Access-Control-Allow-Origin:*');
  10. $this->base_set();
  11. //顶部栏目
  12. $nav_top=db("nav")->where("up_id",0)->order("sort asc")->select();
  13. foreach ($nav_top as $k => $v) {
  14. $nav_top[$k]['child']=db("nav")->where("status",1)->where("up_id",$v['id'])->order("sort desc")->select();

Call Stack

  1. in Pub.php line 16
  2. at Error::appError(2, 'Cannot modify header...', '/data/home/qxu164988...', 16, [])
  3. at header('Content-type:text/ht...') in Pub.php line 16
  4. at Pub->_initialize() in Controller.php line 56
  5. at Controller->__construct(object(Request))
  6. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 244
  7. at App::invokeClass('app\index\controller...') in Loader.php line 418
  8. at Loader::controller('Index', 'controller', false, 'Error') in App.php line 369
  9. at App::module(['', null, null], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 131
  10. at App::run() in start.php line 18
  11. at require('/data/home/qxu164988...') in index.php line 19

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
DOCUMENT_ROOT /usr/home/qxu1649880295/htdocs
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_CONNECTION Keep-Alive
HTTP_HOST hulujinfang.com
HTTP_IF_MODIFIED_SINCE Mon, 28 Sep 2020 12:27:13 GMT
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
PATH /bin:/usr/bin
PHPRC /var/www/php55/hichina_ini/qxu1649880295
QUERY_STRING
REDIRECT_STATUS 200
REMOTE_ADDR 35.170.78.142
REMOTE_PORT 59322
REQUEST_METHOD GET
REQUEST_URI /
SCRIPT_FILENAME /usr/home/qxu1649880295/htdocs/index.php
SCRIPT_NAME /index.php
SERVER_ADDR 121.42.120.246
SERVER_ADMIN webmaster@qxu1649880295.my3w.com
SERVER_NAME hulujinfang.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
UNIQUE_ID X5ThRQofRdAAAByhLUcAAAAZ
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1603592517.5475
REQUEST_TIME 1603592517
Environment Variablesempty
ThinkPHP Constants
/data/home/qxu1649880295/htdocs /data/home/qxu1649880295/htdocs/
APP_PATH /data/home/qxu1649880295/htdocs/application/
THINK_VERSION 5.0.5
THINK_START_TIME 1603592517.5497
THINK_START_MEM 301408
EXT .php
DS /
THINK_PATH /data/home/qxu1649880295/htdocs/thinkphp/
LIB_PATH /data/home/qxu1649880295/htdocs/thinkphp/library/
CORE_PATH /data/home/qxu1649880295/htdocs/thinkphp/library/think/
TRAIT_PATH /data/home/qxu1649880295/htdocs/thinkphp/library/traits/
ROOT_PATH /data/home/qxu1649880295/htdocs/
EXTEND_PATH /data/home/qxu1649880295/htdocs/extend/
VENDOR_PATH /data/home/qxu1649880295/htdocs/vendor/
RUNTIME_PATH /data/home/qxu1649880295/htdocs/runtime/
LOG_PATH /data/home/qxu1649880295/htdocs/runtime/log/
CACHE_PATH /data/home/qxu1649880295/htdocs/runtime/cache/
TEMP_PATH /data/home/qxu1649880295/htdocs/runtime/temp/
CONF_PATH /data/home/qxu1649880295/htdocs/application/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN false
ADDON_PATH /data/home/qxu1649880295/htdocs/addons/